Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-71644

Code Snippet macro does not display the same styling on using Include page macro

      Summary:
      Include page macro where page created with the new editor with code snippet macro does not render the same styling when referenced in another page using Include page macro.

      It's not the same in the classic Editor

      Steps to Reproduce

      • Create a page with Code Snippet macro.
      • Create another page with Include page macro.
      • Add a page with Code Snippet macro created on the first page in Include page macro

      Expected Result
      It should show a code snippet macro with the same styling (for eg numbered lines)

      Actual Result
      New editor page where code snippet is used


      The page where Include macro is used



      Old Editor where Code Block macro is used

      Page with Include macro to show page created on the first step

      Additional macros affected

      The issue also affects these macros.

      1. Panels (info, success, note, warning, success, error)
      2. Tables
      3. All third-party macros that use body type rich-text.

       

      Workaround

      As shared in the comments, a workaround to this issue is to use the excerpt macro instead then render the content in another page by using the excerpt include macro instead of using the page include macro

        1. inspect-page.png
          inspect-page.png
          189 kB
        2. page-with-include-macro.png
          page-with-include-macro.png
          38 kB
        3. page-with-snippet.png
          page-with-snippet.png
          37 kB
        4. screenshot-1.png
          screenshot-1.png
          277 kB
        5. screenshot-2.png
          screenshot-2.png
          180 kB
        6. screenshot-3.png
          screenshot-3.png
          240 kB
        7. screenshot-4.png
          screenshot-4.png
          177 kB
        8. screenshot-5.png
          screenshot-5.png
          139 kB
        9. screenshot-6.png
          screenshot-6.png
          144 kB

          Form Name

            [CONFCLOUD-71644] Code Snippet macro does not display the same styling on using Include page macro

            The issue is assigned to the inactive user; can it be assigned to an active user to have better visibility?

             

            Rama Krishna Anumola {Appfire} added a comment - The issue is assigned to the inactive user; can it be assigned to an active user to have better visibility?  

            MS added a comment - - edited

            I guess "progress" on this issue must be really slow. It also affects code blocks inside macro blocks such as Numbered headings. My "solution" was to remove all included pages with code blocks (thereby creating duplicate content that I will have to maintain) and to use the heading numbering that you activate when the page is not in edit mode instead of the macro block. 

            MS added a comment - - edited I guess "progress" on this issue must be really slow. It also affects code blocks inside macro blocks such as Numbered headings. My "solution" was to remove all included pages with code blocks (thereby creating duplicate content that I will have to maintain) and to use the heading numbering that you activate when the page is not in edit mode instead of the macro block. 

            Len Quam added a comment -

            Confirming for Atlassian support that this issue still appears after page (and full browser) cache deletion. I was also asked to ensure that the confluence.frontend.fabric.editor.macro.adf.frontend.render flag is not disabled, but as we're on Confluence Cloud I have no idea how to check this nor do I believe that Cloud instances have access to this and other properties.

            Len Quam added a comment - Confirming for Atlassian support that this issue still appears after page (and full browser) cache deletion. I was also asked to ensure that the confluence.frontend.fabric.editor.macro.adf.frontend.render flag is not disabled, but as we're on Confluence Cloud I have no idea how to check this nor do I believe that Cloud instances have access to this and other properties.

            Hi Kash,

            Thanks for sharing the status and the workaround. Just to let you know, using the Excerpt macro is not feasable in most of our use cases. Why:

            • We're using third-party apps to version and translate page trees, while the excerpt macros are used for different use cases, e.g. showing excerpts in other macros or for alternative search terms (hidden in page) etc. Yes, I know, we can configure names for any excerpts macros. However in our use cases this would put an extra drop for complexity.
            • Often the page with the code block is surrounded by other description or explanatory texts, maybe with images or else. 

            It would be great to have a fix for this.

            Best,

            Heike

             

            Heike Fischer added a comment - Hi Kash, Thanks for sharing the status and the workaround. Just to let you know, using the Excerpt macro is not feasable in most of our use cases. Why: We're using third-party apps to version and translate page trees, while the excerpt macros are used for different use cases, e.g. showing excerpts in other macros or for alternative search terms (hidden in page) etc. Yes, I know, we can configure names for any excerpts macros. However in our use cases this would put an extra drop for complexity. Often the page with the code block is surrounded by other description or explanatory texts, maybe with images or else.  It would be great to have a fix for this. Best, Heike  

            Nate Dame added a comment -

            This is affecting us, a fix would be great!

            Nate Dame added a comment - This is affecting us, a fix would be great!

            Kash added a comment -

            I contacted Atlassian Support, there is currently no ETA on the ADF rendering feature that contains the fix. There is a workaround however..

            We tested this on our test instance and found a workaround that may be suitable to preserve your formatting when including content from one page to another. The workaround is to use the excerpt macro instead then render the content in another page by using the excerpt include macro instead of using the page include macro. 

            Excerpt macro docs: https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-macro/

             

            I tested this out and it worked successfully for me. All my page content rendered correctly, code snippets and tables all had original formatting. So this is a good enough workaround for now.

            Kash added a comment - I contacted Atlassian Support, there is currently no ETA on the ADF rendering feature that contains the fix. There is a workaround however.. We tested this on our test instance and found a workaround that may be suitable to preserve your formatting when including content from one page to another. The workaround is to use the excerpt macro instead then render the content in another page by using the excerpt include macro instead of using the page include macro. Excerpt macro docs: https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-macro/   I tested this out and it worked successfully for me. All my page content rendered correctly, code snippets and tables all had original formatting. So this is a good enough workaround for now.

            We are experiencing the same issue also, the code snippet block is not showing up correct in the included page.

            Source page:

            included in a page :

            Trisha Organ added a comment - We are experiencing the same issue also, the code snippet block is not showing up correct in the included page. Source page: included in a page :

            Has any progress been made here? I'm still having issues with it. 

            Bradley Stannard added a comment - Has any progress been made here? I'm still having issues with it. 

            I don't think that this behaviour of the code snippet is restricted to it being used in conjunction with the insert page macro - it just works that way.

             

            Peter Hochstrasser added a comment - I don't think that this behaviour of the code snippet is restricted to it being used in conjunction with the insert page macro - it just works that way.  

            This fix is supposed to be a part of ADF Rendering Macro . Our team is currently working on some blockers for this feature to be released. Once released I will keep this ticket updated. 

            pc (Inactive) added a comment - This fix is supposed to be a part of ADF Rendering Macro . Our team is currently working on some blockers for this feature to be released. Once released I will keep this ticket updated. 

              jramos@atlassian.com Josh Ramos (Inactive)
              b0b849db5d18 Trupti Das
              Affected customers:
              58 This affects my team
              Watchers:
              53 Start watching this issue

                Created:
                Updated: