Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-28721

renderConfluenceMacro on include macro does not render sections of a page

      If you want to customize the dashboard by editing the Global layout and you include the following call:

      $helper.renderConfluenceMacro("{include:SPACE:Page with sections}")

      When the page you want to include (in the example called Page with sections) uses a layout with different sections, the sections are not displayed in the place where they should be, but one after another.

      The include page macro works as expected (sections are displayed where they should) if it is used in a page.

            [CONFSERVER-28721] renderConfluenceMacro on include macro does not render sections of a page

            Adam Cohen added a comment - - edited

            that doesn't seem to be working on my 5.5 test system:
            layout template, with context:

            #permitSearchEngines()
            <div id="foo" class="wiki-content">
            $helper.renderConfluenceMacro("

            {include:adminops:myCustomDashboard}

            ")
            </div>
            #dashboard_renderGlobalActions("dashboardActionsId", ["system.dashboard"] )

            Adam Cohen added a comment - - edited that doesn't seem to be working on my 5.5 test system: layout template, with context: #permitSearchEngines() <div id="foo" class="wiki-content"> $helper.renderConfluenceMacro(" {include:adminops:myCustomDashboard} ") </div> #dashboard_renderGlobalActions("dashboardActionsId", ["system.dashboard"] )

            Aha! For anyone else that finds themselves in this predicament and eventually landing on this page - if you surround the macro call with a div with the CSS class wiki-content everything renders properly!

            Ian Sullivan added a comment - Aha! For anyone else that finds themselves in this predicament and eventually landing on this page - if you surround the macro call with a div with the CSS class wiki-content everything renders properly!

            Ian Sullivan added a comment - - edited

            I've just run into the exact same problem - took me half a day to track down this page as I spent most of it reading velocity docs and assuming I'd done something wrong :/

            It seems this issue has been known for a while. Is there any ETA as to when it'll be resolved? - the workaround is a poor 'stop-gap' solution, obviously it works but it's very messy.

            As others have pointed out the Atlassian documentation suggests including a page for customising the dashboard. Surely this would be worth making some kind of note there to point out this (frankly quite massive) gotcha?

            We recently purchased Confluence and it seems that in order to make this work I have to either:
            A. create a bunch of pages then create a bunch of extra code, rather then a one line include to a single page,
            B. downgrade to 5.1.

            For reference we're using 5.4.4 and still seeing this issue

            Ian Sullivan added a comment - - edited I've just run into the exact same problem - took me half a day to track down this page as I spent most of it reading velocity docs and assuming I'd done something wrong :/ It seems this issue has been known for a while. Is there any ETA as to when it'll be resolved? - the workaround is a poor 'stop-gap' solution, obviously it works but it's very messy. As others have pointed out the Atlassian documentation suggests including a page for customising the dashboard. Surely this would be worth making some kind of note there to point out this (frankly quite massive) gotcha? We recently purchased Confluence and it seems that in order to make this work I have to either: A. create a bunch of pages then create a bunch of extra code, rather then a one line include to a single page, B. downgrade to 5.1. For reference we're using 5.4.4 and still seeing this issue

            We are testing an upgrade to confluence 5.3.4 and are still having issues with the include macro. The sections of a page are still not rendered correctly on the the dashboard.

            Steven Kauffmann added a comment - We are testing an upgrade to confluence 5.3.4 and are still having issues with the include macro. The sections of a page are still not rendered correctly on the the dashboard.

            MJP added a comment -

            @ Timo Hiekkanen:
            Thank you for your workaround!
            Waiting for the release of V5.3.1...

            MJP added a comment - @ Timo Hiekkanen: Thank you for your workaround! Waiting for the release of V5.3.1...

            Yes, it would be great to get this fixed. At the moment, the main landing page for our support site is unusable. So we're holding off upgrading until it's fixed.

            Brian Harris added a comment - Yes, it would be great to get this fixed. At the moment, the main landing page for our support site is unusable. So we're holding off upgrading until it's fixed.

            We're suffering from this too - we can't upgrade until this is fixed, because we use Confluence for customer-facing documentation.

            Atlassian actually recommend using the Include Page macro on the dashboard in Editing the site welcome message (scroll down to "Including content from another page"). As the Include Page macro doesn't work on the dashboard, they should either fix the bug or change their documentation!

            Beth Aitman added a comment - We're suffering from this too - we can't upgrade until this is fixed, because we use Confluence for customer-facing documentation. Atlassian actually recommend using the Include Page macro on the dashboard in Editing the site welcome message (scroll down to "Including content from another page"). As the Include Page macro doesn't work on the dashboard, they should either fix the bug or change their documentation!

            Workaround: Its possible to create separate page for every section or column and include them into html table.

            Example:
            <table width="100%">
            <tr>
            <td width="30%">
            $helper.renderConfluenceMacro("

            {include:SPACE:column1}

            ")
            </td>
            <td width="70%">
            $helper.renderConfluenceMacro("

            {include:SPACE:column2}

            ")
            </td>
            </tr>
            </table>

            Timo Hiekkanen added a comment - Workaround: Its possible to create separate page for every section or column and include them into html table. Example: <table width="100%"> <tr> <td width="30%"> $helper.renderConfluenceMacro(" {include:SPACE:column1} ") </td> <td width="70%"> $helper.renderConfluenceMacro(" {include:SPACE:column2} ") </td> </tr> </table>

            I've used the include macro on global layout and experienced no problem until I upgraded to version 5.1.5. Worked fine with version 5.1.3. Now, it is impossible to have columns on included dashboard since two column page layout and section+column are both rendered incorrectly.

            I think this is major or critical bug since many people are using include to customize their dashboards. Should be fixed!

            Timo Hiekkanen added a comment - I've used the include macro on global layout and experienced no problem until I upgraded to version 5.1.5. Worked fine with version 5.1.3. Now, it is impossible to have columns on included dashboard since two column page layout and section+column are both rendered incorrectly. I think this is major or critical bug since many people are using include to customize their dashboards. Should be fixed!

              psaw PatrickA
              aconde Alejandro Conde Carrillo (Inactive)
              Affected customers:
              11 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: