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

Code Macro broken on some OnDemand instances since 5.5-OD-28

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

      When visiting the Configure Code Macro page in Administration, the following stack trace is thrown:

      Cause
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDefaultLanguageResource' in class com.atlassian.confluence.ext.code.config.ConfigureNewcodeAction threw exception com.atlassian.confluence.ext.code.languages.UnknownLanguageException at /templates/macros/newcode/config/configure-newcode.vm[line 7, column 26]
          at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
      caused by: com.atlassian.confluence.ext.code.languages.UnknownLanguageException
          at com.atlassian.confluence.ext.code.languages.impl.LanguageRegistryImpl.getLanguage(LanguageRegistryImpl.java:53)
      Stack Trace:[hide]
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDefaultLanguageResource' in  class com.atlassian.confluence.ext.code.config.ConfigureNewcodeAction threw exception com.atlassian.confluence.ext.code.languages.UnknownLanguageException at /templates/macros/newcode/config/configure-newcode.vm[line 7, column 26]
      	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      	at org.apache.velocity.context.ProxyVMContext.get(ProxyVMContext.java:222)
      	at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:843)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:222)
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:155)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      	at org.apache.velocity.Template.merge(Template.java:328)
      	at org.apache.velocity.Template.merge(Template.java:235)
      	at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
      	at com.atlassian.xwork.results.ProfiledVelocityResult.doExecute(ProfiledVelocityResult.java:21)
      	at com.atlassian.confluence.setup.webwork.EncodingVelocityResult.doExecute(EncodingVelocityResult.java:48)
      	at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116)
      	at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187)
      	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:65)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100)
      	at com.atlassian.confluence.xwork.ConfluenceXsrfTokenInterceptor.intercept(ConfluenceXsrfTokenInterceptor.java:26)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.security.interceptors.CaptchaInterceptor.intercept(CaptchaInterceptor.java:50)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.validation.MessageHolderInterceptor.intercept(MessageHolderInterceptor.java:43)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:52)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.core.CancellingInterceptor.intercept(CancellingInterceptor.java:24)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.xwork.HttpMethodValidationInterceptor.intercept(HttpMethodValidationInterceptor.java:72)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.security.websudo.WebSudoInterceptor.intercept(WebSudoInterceptor.java:37)
      	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      	at com.atlassian.confluence.themes.ThemeContextInterceptor.intercept(ThemeContextInterceptor.java:68)
      [...]
      Caused by: com.atlassian.confluence.ext.code.languages.UnknownLanguageException
      	at com.atlassian.confluence.ext.code.languages.impl.LanguageRegistryImpl.getLanguage(LanguageRegistryImpl.java:53)
      	at com.atlassian.confluence.ext.code.config.ConfigureNewcodeAction.getDefaultLanguage(ConfigureNewcodeAction.java:127)
      	at com.atlassian.confluence.ext.code.config.ConfigureNewcodeAction.getDefaultLanguageAlias(ConfigureNewcodeAction.java:141)
      	at com.atlassian.confluence.ext.code.config.ConfigureNewcodeAction.getDefaultLanguageResource(ConfigureNewcodeAction.java:165)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:533)
      	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198)
      	... 322 more
      

      Any existing code macros display the code on pages but without any syntax highlighting. When you edit the macro itself (or insert a new one) there's an error above the code preview "Error rendering macro 'code': Invalid value specified for parameter 'lang'", and the Syntax Highlighting dropdown says "java" and nothing else. Enabling and disabling the plugin hasn't done anything, nor has a restart. No obvious errors are logged when disabling/enabling the plugin too.

      When viewing the code macro on a page, the following error may be displayed above the contents of the code-macro:

      Error rendering macro 'code': Invalid value specified for parameter 'lang'
      

      I haven't been able to reproduce this in a test environment, but we've got 3 support cases so far.

            [CONFSERVER-34322] Code Macro broken on some OnDemand instances since 5.5-OD-28

            Hi sgorman1

            Thanks for the update. I think that this might need some further investigation. Would you be able to raise a support request on https://support.atlassian.com. Once you've done this one of our support engineers will be in touch and will work with you in identifying exactly what is occurring with your system.

            Regards
            Steve Haffenden
            Confluence Bugmaster

            Steve Haffenden (Inactive) added a comment - Hi sgorman1 Thanks for the update. I think that this might need some further investigation. Would you be able to raise a support request on https://support.atlassian.com . Once you've done this one of our support engineers will be in touch and will work with you in identifying exactly what is occurring with your system. Regards Steve Haffenden Confluence Bugmaster

            5.6.4 is listed now, but it still shows the Code Macro Plugin in the incompatible section along with Advanced Macros, Confluence What's New, and IM Presence NG Plugin.

            Sean Gorman added a comment - 5.6.4 is listed now, but it still shows the Code Macro Plugin in the incompatible section along with Advanced Macros, Confluence What's New, and IM Presence NG Plugin.

            Hi sgorman1

            Thanks for getting in touch. This issue was resolved in Confluence 5.6.3 and will have been shipped with 5.6.3 and 5.6.4 (both versions contain the fix)as long as you are running either of these then you will have the updated version of the Code Macro. I suspect that 5.6.4 not being listed may be a result of the release only having been made public late yesterday.

            Could I ask to check the upgrade manager again?

            Regards
            Steve Haffenden
            Confluence Bugmaster

            Steve Haffenden (Inactive) added a comment - Hi sgorman1 Thanks for getting in touch. This issue was resolved in Confluence 5.6.3 and will have been shipped with 5.6.3 and 5.6.4 (both versions contain the fix)as long as you are running either of these then you will have the updated version of the Code Macro. I suspect that 5.6.4 not being listed may be a result of the release only having been made public late yesterday. Could I ask to check the upgrade manager again? Regards Steve Haffenden Confluence Bugmaster

            I am hosting Confluence on my own server and confused on if I can update or not. The Code Macro is very important.

            Upgrade advisor has the Code Macro listed as not compatible to 5.6.3, and 5.6.4 is not listed as a choice to test compatibility.

            The 5.6.4 release does not mention anything about the Code Macro. Updating without this macro is not an option, does the issue effect my own environment and was it fixed in 5.6.4?

            Sean Gorman added a comment - I am hosting Confluence on my own server and confused on if I can update or not. The Code Macro is very important. Upgrade advisor has the Code Macro listed as not compatible to 5.6.3, and 5.6.4 is not listed as a choice to test compatibility. The 5.6.4 release does not mention anything about the Code Macro. Updating without this macro is not an option, does the issue effect my own environment and was it fixed in 5.6.4?

            The damage has been done. It was previously indicated that this fix IS available for OnDemand which isn't the case. So what was that information based off of? An unverified assumption?

            If you're familiar with Agile methodologies I'm sure you can understand the importance of having users able to trust that the information they receive about the release status is accurate. Atlassian has failed in this case and your feedback is nearly identical to the misinformation we've already received, so your credibility is shot.

            I will continue to wait until that still unknown time when this fix is actually implemented in my environment, all the while extremely disappointed and untrusting in your team's ability to resolve issues in a timely manner.

            Robert Van Dell added a comment - The damage has been done. It was previously indicated that this fix IS available for OnDemand which isn't the case. So what was that information based off of? An unverified assumption? If you're familiar with Agile methodologies I'm sure you can understand the importance of having users able to trust that the information they receive about the release status is accurate. Atlassian has failed in this case and your feedback is nearly identical to the misinformation we've already received, so your credibility is shot. I will continue to wait until that still unknown time when this fix is actually implemented in my environment, all the while extremely disappointed and untrusting in your team's ability to resolve issues in a timely manner.

            Hi andrew.c.stewart, bruce13, guilherme.nogueira, mike37, jet.liu, kfranz and rvandell

            Thanks for your comments. I appreciate your frustration at not yet having this fix available to you in OnDemand. Obviously we try to get fixes deployed to our customers as quickly as possible unfortunately this isn't always quickly enough and for that I apologies. However, the fix for this issue will be released with the next update to Confluence to OnDemand and so will be available shortly.

            Regards
            Steve Haffenden
            Confluence Bugmaster

            Steve Haffenden (Inactive) added a comment - Hi andrew.c.stewart , bruce13 , guilherme.nogueira , mike37 , jet.liu , kfranz and rvandell Thanks for your comments. I appreciate your frustration at not yet having this fix available to you in OnDemand. Obviously we try to get fixes deployed to our customers as quickly as possible unfortunately this isn't always quickly enough and for that I apologies. However, the fix for this issue will be released with the next update to Confluence to OnDemand and so will be available shortly. Regards Steve Haffenden Confluence Bugmaster

            @vvo Can you please take care of this?

            Robert Van Dell added a comment - @vvo Can you please take care of this?

            Kale Franz added a comment -

            Why is this ticket still marked as Resolved and Fixed?

            Kale Franz added a comment - Why is this ticket still marked as Resolved and Fixed?

            Jet Liu added a comment -

            Can't believe this is something Atlassian, a now billion dollar company, a) couldn't detect in the DEV/QA process, b) couldn't properly fix after 3 months! Time to check if compensation is mentioned in the SLA now.

            Jet Liu added a comment - Can't believe this is something Atlassian, a now billion dollar company, a) couldn't detect in the DEV/QA process, b) couldn't properly fix after 3 months! Time to check if compensation is mentioned in the SLA now.

            We just recently switched to Confluence after evaluating a bunch of options. Part of the reason was frequent updates. The lack of process on something as simple as this makes me question our decision, and those other options are still possible.

            Your company makes tools to do continuous integration... assuming you're using your own tools, having a 2 week release cycle gives me huge doubts about how effective your product suite is for continuous integration.

            This looks bad and continues to look bad as long as we keep seeing "Error rendering macro 'code': Invalid value specified for parameter 'lang'" on our pages, like we have for a long time now. It looks even worse when you keep promising that you have fixes in hand then saying "oops we didn't release them, wait 2 more weeks." without actually releasing them.

            Deleted Account (Inactive) added a comment - We just recently switched to Confluence after evaluating a bunch of options. Part of the reason was frequent updates. The lack of process on something as simple as this makes me question our decision, and those other options are still possible. Your company makes tools to do continuous integration... assuming you're using your own tools, having a 2 week release cycle gives me huge doubts about how effective your product suite is for continuous integration. This looks bad and continues to look bad as long as we keep seeing "Error rendering macro 'code': Invalid value specified for parameter 'lang'" on our pages, like we have for a long time now. It looks even worse when you keep promising that you have fixes in hand then saying "oops we didn't release them, wait 2 more weeks." without actually releasing them.

              vvo Vu Truong Vo (Inactive)
              nmason Nick Mason
              Affected customers:
              20 This affects my team
              Watchers:
              49 Start watching this issue

                Created:
                Updated:
                Resolved: