• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 5.9.3, 6.0.0-OD-2015.48.1
    • 5.1, 5.2.5, 5.3.4, 5.5.2, 5.8, 5.7-OD-44-026

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Steps to Reproduce

      1. Create a page
      2. Add a code block to it with the theme Fade to Grey
        • Preview the page and observe that the code block is a black background with white text
      3. Add another code block, and do not set a theme on it
        • Preview again and observe that both code blocks have the default formatting

      _______________________________
      Hi,
      We've experienced recently some problems with Code Block Macro. Those problems unfortunately started to repeat.

      Those are the steps that I've done:
      1. Wrote "Logback configuration" section with code block (formatting in attachment).
      2. Save the document.
      3. Edit and add upper section with another code block (different formatting) + some No Format block (I'm not sure if it's connected, but I think it's worth mention)
      4. Save

      Now all code blocks (as you can see in attachment) have the same formatting as last code block. I'm also not 100% sure if this formatting is inherited from last code block or just randomly.

      I hope it's reproducible and can be fixed easily.

      Confluence: 5.1
      Code Macro Plugin: 2.0.19

      Let me know if you need anythnig else.

            [CONFSERVER-29390] Wrong Code Block Macro formatting

            This is still an issue in 5.9.1-pluginsfour019.

            Scott Dawson added a comment - This is still an issue in 5.9.1-pluginsfour019.

            Any latest to the issue - last "code block" macro overrides theme of all other "code block" macros on the same page? version 5.7.1
            Thanks.

            Konstantin Myasoyedov added a comment - Any latest to the issue - last "code block" macro overrides theme of all other "code block" macros on the same page? version 5.7.1 Thanks.

            Similar issue on v5.8.8. Formatting does not apply in many cases.

            Justin Moninger added a comment - Similar issue on v5.8.8. Formatting does not apply in many cases.

            We also have this issue on v5.7.1. I have the exact same use case as Adam Latuszek, I would like to distinguish between command line, and Java/XML.

            Rupert Madden-Abbott added a comment - We also have this issue on v5.7.1. I have the exact same use case as Adam Latuszek, I would like to distinguish between command line, and Java/XML.

            Experiencing this issue in our instance of v5.8.4 as well.

            Spencer Schill added a comment - Experiencing this issue in our instance of v5.8.4 as well.

            Anna McDonald added a comment - - edited

            I have this problem in v5.6.6, and it is a pain because I am trying to show C# and Java examples on the same page. I had the C# in there with the Default/Confluence theme, but when I added Java with the Eclipse theme, it changed the C# code block to the Eclipse colors, too! I am writing technical documentation with examples for our customers to use, so this is a big deal for us.

            Anna McDonald added a comment - - edited I have this problem in v5.6.6, and it is a pain because I am trying to show C# and Java examples on the same page. I had the C# in there with the Default/Confluence theme, but when I added Java with the Eclipse theme, it changed the C# code block to the Eclipse colors, too! I am writing technical documentation with examples for our customers to use, so this is a big deal for us.

            My issue is similar. I can set the Theme view the Macro modal and preview succesfully. but the saved page just shows default theme. Having code blocks stand out would be nice.

            Kevin Marino added a comment - My issue is similar. I can set the Theme view the Macro modal and preview succesfully. but the saved page just shows default theme. Having code blocks stand out would be nice.

            Sven Moens added a comment - - edited

            This also affects the blog page. Two individual blog posts each with their own theme applied will be shown with the theme of the first blog post in the blog.

            Sven Moens added a comment - - edited This also affects the blog page. Two individual blog posts each with their own theme applied will be shown with the theme of the first blog post in the blog.

            Also affects 5.6.6

            Austin Witt added a comment - Also affects 5.6.6

            I understand this defect is truly with the underlying third-party SyntaxHighlighter library that Confluence builds atop of. However, Confluence's UI actively misleads the user by presenting the Syntax Highlighting and Theme selections as per Code Block Macro instance, when truly these values are per page. As such, they should be presented as page-level attributes, not per macro.

            If Atlassian doesn't want to fork SyntaxHighlighter and fix it (since Alex Gorbatchev has declined over almost 3 years now), then Atlassian should change Confluence's UI to properly present the options to the user at the correct, effective scope (per page, not per macro).

            Todd Trimmer added a comment - I understand this defect is truly with the underlying third-party SyntaxHighlighter library that Confluence builds atop of. However, Confluence's UI actively misleads the user by presenting the Syntax Highlighting and Theme selections as per Code Block Macro instance, when truly these values are per page. As such, they should be presented as page-level attributes, not per macro. If Atlassian doesn't want to fork SyntaxHighlighter and fix it (since Alex Gorbatchev has declined over almost 3 years now), then Atlassian should change Confluence's UI to properly present the options to the user at the correct, effective scope (per page, not per macro).

              jmcarthur James McArthur (Inactive)
              e6acccb59b07 Adam Latuszek
              Affected customers:
              33 This affects my team
              Watchers:
              41 Start watching this issue

                Created:
                Updated:
                Resolved: