Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONF-22263

PDF export doesn't render the content of a code macro inside an include macro

    Details

    • Last commented by user?:
      true
    • Sub-Component:
      Editor - Macros

      Description

      When you have two pages with the macro code and in one of them you insert a include macro pointing to the other page which contains the code macro renders correctly, but when you export the page, it doesn't show the include macro with the other page.

      Example: Page A contains

      test
      

      Page B contains

      {include:A}
      test2
      

      When you export page B to pdf, it will only show 'test2' and not 'test'

        Attachments

          Issue Links

            Activity

            rgadami Rodrigo Girardi Adami [Atlassian] created issue -
            rgadami Rodrigo Girardi Adami [Atlassian] made changes -
            Field Original Value New Value
            Description When you have two pages with the macro code and in one of them you insert a include macro pointing to the other page which contains the code macro renders correctly, but when you export the page, it doesn't show the include macro with the other page.

            Example: Page A contains
            {code}
            test
            {code}

            Page B constains
            {include:A}
            {code}
            test2
            {code}

            When you export page B to pdf, it will only show 'test2' and not 'test'
            When you have two pages with the macro code and in one of them you insert a include macro pointing to the other page which contains the code macro renders correctly, but when you export the page, it doesn't show the include macro with the other page.

            Example: Page A contains
            {code}
            test
            {code}

            Page B contains
            {include:A}
            {code}
            test2
            {code}

            When you export page B to pdf, it will only show 'test2' and not 'test'
            vchoy Vincent Choy [Atlassian] x made changes -
            Status New [ 10034 ] Open [ 1 ]
            hhloi HengHwa Loi [Atlassian] made changes -
            Labels bugfix_support_backlog
            mhrynczak Mark Hrynczak [Atlassian] made changes -
            Summary PDF export doesn't render correctly when include and code macro are on same page PDF export doesn't render the content of a code macro inside an include macro
            Priority Minor [ 4 ] Critical [ 2 ]
            mhrynczak Mark Hrynczak [Atlassian] made changes -
            Link This issue is related to CONF-22669 [ CONF-22669 ]
            matt@atlassian.com Matt Ryall made changes -
            Workflow Conf Bug Quality Review WorkFlow [ 284412 ] Confluence Bug Workflow [ 333631 ]
            Hide
            rhukspu Matthias added a comment -

            This also affects version 4.0

            Show
            rhukspu Matthias added a comment - This also affects version 4.0
            jclark@atlassian.com Joe Clark made changes -
            Remote Link This issue links to "NCODE-187 (Web Link)" [ 11213 ]
            jclark@atlassian.com Joe Clark made changes -
            Remote Link This issue links to "ADVMACROS-226 (Web Link)" [ 11220 ]
            Hide
            jclark@atlassian.com Joe Clark added a comment -

            This is fixed in Advanced Macros Plugin version 2.0.30 available for download from plugins.atlassian.com - https://plugins.atlassian.com/plugin/details/145?versionId=767102

            Show
            jclark@atlassian.com Joe Clark added a comment - This is fixed in Advanced Macros Plugin version 2.0.30 available for download from plugins.atlassian.com - https://plugins.atlassian.com/plugin/details/145?versionId=767102
            jclark@atlassian.com Joe Clark made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Assignee Joseph Clark [Atlassian] [ jclark@atlassian.com ]
            Fix Version/s 4.0 [ 15862 ]
            Resolution Fixed [ 1 ]
            Hide
            nata.ramanenka Nata added a comment -

            I have found a workaround for the code bug.
            1) Disable the built-in code plugin.
            2) Create a new user macro with the name "code". It should generate wiki markup like this:

            {html}
            <div style="line-break:strict !important; white-space: pre !important; font-family:courier !important; border-style:dashed !important; padding:0px 10px 10px 10px !important; border-color:grey; border-width:1px; border-radius: 3px; overflow: auto;">
            <b style="position:relative; top: 0px;">$body</b>
            </div>{html}

            3) Define the style for code in PDF.

            Maybe this can help someone.

            Show
            nata.ramanenka Nata added a comment - I have found a workaround for the code bug. 1) Disable the built-in code plugin. 2) Create a new user macro with the name "code". It should generate wiki markup like this: {html} <div style="line-break:strict !important; white-space: pre !important; font-family:courier !important; border-style:dashed !important; padding:0px 10px 10px 10px !important; border-color:grey; border-width:1px; border-radius: 3px; overflow: auto;"> <b style="position:relative; top: 0px;">$body</b> </div>{html} 3) Define the style for code in PDF. Maybe this can help someone.
            akazatchkov.adm Anatoli Kazatchkov [Administrative Account] made changes -
            Workflow Confluence Bug Workflow [ 333631 ] New Confluence Default Workflow [ 467325 ]
            etom Edith Tom made changes -
            Sub-Component Editor - Macros [ 13141 ]
            Component/s Editor [ 38090 ]
            Component/s PDF Generation [ 10410 ]
            Component/s Macros - Code Macro [ 12361 ]
            Component/s Macros - Include Macro [ 12408 ]
            Labels bugfix_support_backlog bugfix_support_backlog macros-code-macro
            mhrynczak Mark Hrynczak [Atlassian] made changes -
            Workflow New Confluence Default Workflow [ 467325 ] Confluence Cloud First Workflow [ 1114512 ]
            osanico Owen Sanico made changes -
            Workflow Confluence Cloud First Workflow [ 1114512 ] Confluence Cloud First Workflow v2 [ 1193578 ]
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Labels bugfix_support_backlog macros-code-macro bugfix_support_backlog editor macros-code-macro
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Component/s Editor - Editor [ 40706 ]
            Labels bugfix_support_backlog editor macros-code-macro bugfix_support_backlog editor editor-macros macros-code-macro
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Component/s Editor [ 38090 ]

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  4 years, 7 weeks, 2 days ago