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

Custom language pack for Code Block Macro stopped working in 5.9.x

      After upgrading to 5.9.x, custom language pack used for Code Block Macro has stopped working

      Steps to Reproduce

      1. Upload custom language pack: abaphighlighter into your Confluence Admin > Configure Code Macro: Add a new language.
      2. Optional: Set your Confluence Default Language to the custom language pack.
      3. On a Page, insert Code Block Macro with the following parameters:

      • Syntax Highlighting: abaphighlighter
      • Theme: FadeToGrey

      4. Click on Save to insert the Code Block Macro into the Page.
      5. Put in a Sample Code (refer to Testing Notes)

      Expected Result:

      • Code Block Macro should show the correct Theme and Syntax Highlighting as per the custom language pack

      Actual Result:

      • Code Block Macro showing no Theme and no custom Syntax Highlighting as per the custom language pack

      Additional Notes:

      • Screenshots attached for Testing Results
      • Custom Language pack attached

      WorkAround

      Manually downgrade the Code Block Macro plugin to version 2.1.7.

      To downgrade the add-on, do the following:

      1. Stop Confluence.
      2. Locate the existing .jar files (newcode-macro-plugin-XXX.jar) in <confluence-install>/confluence/WEB-INF/atlassian-bundled-plugins/. Move the file to a different location to create a backup copy.
      3. Place the attached, newcode-macro-plugin-2.1.7.jar , into the atlassian-bundled-plugins directory.
      4. Locate the existing transformed .jar (newcode-macro-plugin-XXX_XXX) in <confluence-install>/plugins-osgi-cache/transformed-plugins/.Delete the file.
      5. Start Confluence.

      As with all recommendations, we strongly suggest testing this in a test environment prior to implementing in Production. If this causes other issues in your instance, you will be asked to switch back to the original version of the .jar.

        1. abaphighlighter.js
          10 kB
          Lauretha Rura
        2. abaphighlighter.zip
          4 kB
          Ryan Benedict
        3. Custom_Code_Block_Macro_in_Confluence_5.9.2_122515_051057_PM.jpg
          326 kB
          Ryan Benedict
        4. Custom_Code_Block_Macro_working_in_5.8.8_122515_044147_PM.jpg
          239 kB
          Ryan Benedict
        5. highlight-orig.js
          0.9 kB
          Dana Jansen
        6. newcode-macro-plugin-2.1.7.jar
          1.69 MB
          J van Leeuwen
        7. Screen Shot 2016-11-04 at 10.39.15 AM.png
          25 kB
          Dana Jansen
        8. Screen Shot 2016-11-04 at 10.39.30 AM.png
          26 kB
          Dana Jansen
        9. Screen Shot 2016-11-04 at 10.39.30 AM.png
          26 kB
          Dana Jansen
        10. theme-not-applied.png
          12 kB
          Feng Xu

            [CONFSERVER-40325] Custom language pack for Code Block Macro stopped working in 5.9.x

            Lauretha Rura made changes -
            Attachment New: abaphighlighter.js [ 350835 ]
            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2887245 ] New: CONFSERVER Bug Workflow v4 [ 2980962 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2788052 ] New: JAC Bug Workflow v3 [ 2887245 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2736835 ] New: JAC Bug Workflow v2 [ 2788052 ]
            Owen made changes -
            Symptom Severity Original: Major [ 14431 ] New: Severity 2 - Major [ 15831 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2391763 ] New: JAC Bug Workflow [ 2736835 ]
            Ryan Kearney made changes -
            Comment [ Hello,

            I am also experiencing this issue in 6.0.7. We migrated data from a 5.8.5 instance and in the new instance, some of the code boxes took on a black background with different colored text. Additionally, semicolons were added to some of the code. If you change from the default syntax highlighting, it will remove the semicolons and change the strange color scheme.

            In the workaround listed here, the plugin-osgi folder is under Confluence home, not Confluence install. 

            Here are some simplified instructions for the workaround listed. Obviously your path will need to be updated for wherever Confluence home is. However, I could not get this to resolve the issue. 
            {code:java}
            cd atlassian/confluence/confluence/WEB-INF/atlassian-bundled-plugins
            wget https://jira.atlassian.com/secure/attachment/189012/189012_newcode-macro-plugin-2.1.7.jar .
            rm -rf newcode-macro-plugin-2.2.7.jar
            cp 189012_newcode-macro-plugin-2.1.7.jar newcode-macro-plugin-2.1.7.jar
            chown confluence:confluence newcode-macro-plugin-2.1.7.jar
            rm -rf 189012_newcode-macro-plugin-2.1.7.jar
            <Confluence_HOME>/plugins-osgi-cache/transformed-plugins
            rm -rf newcode-macro-plugin-2.2.7_1489728436000.jar
            {code} ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2272046 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2391763 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2222132 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2272046 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2168784 ] New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2222132 ]

              jmcarthur James McArthur (Inactive)
              rbenedict Ryan Benedict (Inactive)
              Affected customers:
              19 This affects my team
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: