Expand Macro collapses immediately upon expanding it

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When expanding an 'Expand' macro on a page, the macro immediately collapses half a second after and the data within the 'Expand' macro disappears.

Cause

This is because there are some <div></div> tags and classes enclosed within the storage format of the affected 'Expand' macros that shouldn't be there:

1 2 <div class="expand-container conf-macro output-block"> <div class="expand-control">

Resolution

  1. Install Confluence Source Editor if you don't already have it installed.

  2. Edit the affected page(s).

  3. Click on the <> symbol on the top right corner of the page editor.

  4. Search for the following classes:

    1 2 <div class="expand-container conf-macro output-block"> <div class="expand-control">
  5. Remove it from the code, along with their closing </div> tags.

  6. Click on 'Apply'.

  7. Save the page.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.