• If a plugin module is installed while the system is receiving HTTP traffic, and if the module contains a Velocity helper component, Confluence will sometimes disable the Velocity module of the newly-loaded plugin.

      Symptoms of this problem can be seen in the following KB articles:

      Because of the way the plugin system handles dependencies, this issue sometimes also occurs when other plugins in the system are enabled or disabled, since Confluence will disable and reenable dependent plugins when other plugin actions are performed. This inadvertent reinstall can occur even when other, unrelated plugins are installed in Confluence <3.5.3 (see CONF-22341). Unfortunately, this means that performing an action such as 'enabling plugin A' can cause a result of 'the Velocity template module in plugin B got disabled', and all of this is done without the user's knowledge.

      This occurs due to a race condition during plugin installation, when the plugin is only partially loaded and Confluence is asked to render Velocity content. In com.atlassian.confluence.setup.velocity.PluginContextItemProvider:

                  try 
                  { 
                      velocityContextModuleMap.put(descriptor.getContextKey(), descriptor.getModule()); 
                  } 
                  catch (final RuntimeException ex) 
                  { 
                      // TODO: Fire an event here? this coupling is quite crude 
                      pluginController.disablePluginModule(descriptor.getCompleteKey()); 
                  } 
      

      I attached a debugger to Confluence and found that the exception (which is silently eaten in the above RuntimeException block) is thrown by descriptor.getModule(); the inner exception for "RuntimeException ex" has the following stack trace:

      java.lang.IllegalStateException: Cannot retrieve plugin module before it is enabled: PluginModuleHolder[(unknown; not enabled)] 
      com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:97) 
      com.atlassian.confluence.plugin.descriptor.VelocityContextItemModuleDescriptor.getModule(VelocityContextItemModuleDescriptor.java:36) 
      com.atlassian.confluence.setup.velocity.PluginContextItemProvider.getContextMap(PluginContextItemProvider.java:35) 
      (...)
      

      We didn't try to reproduce this issue with the Office Connector or Doc Theme plugins directly, but we have reproduced it with two separate custom plugins with Velocity context modules, and we believe that the issue is identical. We are able to make this happen consistently by using the UPM to load a plugin with one of the impacted module types while running a script to generate traffic, such as the following:

      #!/bin/bash
      while [ true ]
      do
      	wget http://127.0.0.1:8080/display/Overview/Home
      	sleep 0.5
      done
      

      Notes

      We have recently seen this bug affecting newer versions of Confluence. The major side effect is having velocity modules related to the top navbar being disabled, so it does not load properly. The modules are:

      soyTemplateRendererHelperContext
      velocity.helper
      siteLogoHelperContext
      

      If you see this problem, proceed with the workaround below to re-enable them by removing entries for those modules from the bandana plugin map column:

      For Data Center instances, we need to shutdown all nodes to apply the workaround. Performing a rolling restart may set the modules to disabled again, even after running the query to change them.

      Workaround using UPM REST API

      The following workaround is available so you can identify if you are affected by this bug and it also describes how to fix it (for the moment) without requiring a restart.
      It makes use of UPM REST API calls through a Linux command line.

      Using the UPM REST API to identify if you are affected by this problem

      1. Get UPM token to be used on the next steps – it will be saved as an environment variable.
        CONFLUENCE_BASE_URL=<Confluence Base URL>
        ADMIN_USRNAME=<local admin account username>
        ADMIN_PWD=<local admin account password>
        
        UPM_TOKEN=$(curl -I --user $ADMIN_USRNAME:$ADMIN_PWD -H 'Accept: application/vnd.atl.plugins.installed+json' ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/?os_authType=basic' 2>/dev/null | grep 'upm-token' | cut -d " " -f 2 | tr -d '\r')
        
      2. Get the current status of soyTemplateRendererHelperContext module. If you get a JSON response from that, it means this module is disabled and you are affected by this bug.
        curl --user $ADMIN_USRNAME:$ADMIN_PWD ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key/modules/soyTemplateRendererHelperContext-key?token='${UPM_TOKEN} 2>/dev/null | grep '"enabled":false'
        
      3. Get the current status of velocity.helper module. If you get a JSON response from that, it means this module is disabled and you are affected by this bug.
        curl --user $ADMIN_USRNAME:$ADMIN_PWD ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.extra.officeconnector-key/modules/velocity.helper-key?token='${UPM_TOKEN} 2>/dev/null | grep '"enabled":false'
        
      4. Get the current status of siteLogoHelperContext module. If you get a JSON response from that, it means this module is disabled and you are affected by this bug.
        curl --user $ADMIN_USRNAME:$ADMIN_PWD ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-lookandfeel-key/modules/siteLogoHelperContext-key?token='${UPM_TOKEN} 2>/dev/null | grep '"enabled":false'
        

      Using the UPM REST API to re-enable the affected module

      1. Get UPM token to be used on the next steps – it will be saved as an environment variable.
        CONFLUENCE_BASE_URL=<Confluence Base URL>
        ADMIN_USRNAME=<local admin account username>
        ADMIN_PWD=<local admin account password>
        
        UPM_TOKEN=$(curl -I --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Accept: application/vnd.atl.plugins.installed+json' ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/?os_authType=basic' 2>/dev/null | grep 'upm-token' | cut -d " " -f 2 | tr -d '\r')
        
      2. Get the current status of the soyTemplateRendererHelperContext module and save it in an environment variable, using sed to change the status to enabled ("enabled":false).
        MODIFIED_JSON_OUTPUT=$(curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key/modules/soyTemplateRendererHelperContext-key?token='${UPM_TOKEN} 2>/dev/null | sed 's/"enabled":false/"enabled":true/')
        echo ${MODIFIED_JSON_OUTPUT}
        
      3. Update the soyTemplateRendererHelperContext module status.
        curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Content-Type: application/vnd.atl.plugins.plugin.module+json' -X PUT ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key/modules/soyTemplateRendererHelperContext-key?token='${UPM_TOKEN} --data '<manual output from ${MODIFIED_JSON_OUTPUT}>'
        
      4. Get the current status of the velocity.helper module and save it in an environment variable, using sed to change the status to enabled ("enabled":false).
        MODIFIED_JSON_OUTPUT=$(curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.extra.officeconnector-key/modules/velocity.helper-key?token='${UPM_TOKEN} 2>/dev/null | sed 's/"enabled":false/"enabled":true/')
        echo ${MODIFIED_JSON_OUTPUT}
        
      5. Update the velocity.helper module status.
        curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Content-Type: application/vnd.atl.plugins.plugin.module+json' -X PUT ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.extra.officeconnector-key/modules/velocity.helper-key?token='${UPM_TOKEN} --data '<manual output from ${MODIFIED_JSON_OUTPUT}>'
        
      6. Get the current status of the siteLogoHelperContext module and save it in an environment variable, using sed to change the status to enabled ("enabled":false).
        MODIFIED_JSON_OUTPUT=$(curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-lookandfeel-key/modules/siteLogoHelperContext-key?token='${UPM_TOKEN} 2>/dev/null | sed 's/"enabled":false/"enabled":true/')
        echo ${MODIFIED_JSON_OUTPUT}
        
      7. Update the siteLogoHelperContext module status.
        curl --user ${ADMIN_USRNAME}:${ADMIN_PWD} -H 'Content-Type: application/vnd.atl.plugins.plugin.module+json' -X PUT ${CONFLUENCE_BASE_URL}'/rest/plugins/1.0/com.atlassian.confluence.plugins.confluence-lookandfeel-key/modules/siteLogoHelperContext-key?token='${UPM_TOKEN} --data '<manual output from ${MODIFIED_JSON_OUTPUT}>'
        
      8. Refresh the Confluence page and confirm the top bar is now accessible.


      If you were unable to run this workaround, don't hesitate to open a support request.

            [CONFSERVER-22390] Plugin's velocity module is disabled by Confluence

            nojansen added a comment -

            We had this issue today on Confluence 7.4.4.

            We resolved it by doing the following:

            nojansen added a comment - We had this issue today on Confluence 7.4.4. We resolved it by doing the following: Navigating to  Manage Apps Manually checking which User Installed apps had a Velocity Module disabled and enabling it Manually checking the  System Installed apps  to see which velocity modules were disabled. In our case it was just one case for the Confluence Soy Template Support App and the module Confluence Soy Template Renderer for Velocity. Enabled the System Installed modules by following the instructions on https://confluence.atlassian.com/confkb/cannot-enable-or-disable-bundled-system-apps-or-modules-1035241968.html  

            A fix for this issue is available to Server and Data Center customers in Confluence 7.6.3
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hasnae (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.6.3 Upgrade now or check out the Release Notes to see what other issues are resolved.

            A fix for this issue is available to Server and Data Center customers in Confluence 7.4.7
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            If you're running the Confluence 7.4 Enterprise release, a fix for this issue is now available in Confluence 7.4.7, which you can find in the Download Archives.

            Hasnae (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.4.7 Upgrade now or check out the Release Notes to see what other issues are resolved. If you're running the Confluence 7.4 Enterprise release, a fix for this issue is now available in Confluence 7.4.7, which you can find in the Download Archives .

            eeas_bekl added a comment -

            Hi, 

             

            i have tried the fix, got java exceptions. Is there another way to resolve this issue? I have tried several confluence versions, but still no success. 

            Currently i am on 7.4.1 which was my backup where it was working. But now it seems to happen there as well. 

             

             

            eeas_bekl added a comment - Hi,    i have tried the fix, got java exceptions. Is there another way to resolve this issue? I have tried several confluence versions, but still no success.  Currently i am on 7.4.1 which was my backup where it was working. But now it seems to happen there as well.     

            Marina added a comment -

            Hi @Richard Atkins,

            is there a release date for version 7.4.7 available? It is not in LTS release list yet:

            https://confluence.atlassian.com/doc/confluence-7-4-release-notes-994312218.html#Confluence7.4ReleaseNotes-issuesResolvedissues

            Marina added a comment - Hi @Richard Atkins, is there a release date for version 7.4.7 available? It is not in LTS release list yet: https://confluence.atlassian.com/doc/confluence-7-4-release-notes-994312218.html#Confluence7.4ReleaseNotes-issuesResolvedissues

            A fix for this issue is available to Server and Data Center customers in Confluence 7.10.1
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hasnae (Inactive) added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.10.1 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Any expected date for this fix to be backported to 7.4.x LTS release?

            Abhijit Das added a comment - Any expected date for this fix to be backported to 7.4.x LTS release?

            Alex K added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 7.9.0
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Alex K added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.9.0 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi All,

            Thanks for all your feedback after we have closed this bug. I want to apologise again for all the pain it has caused you and your organisation. I want to assure you all that yes, this is a high priority bug that we do plan to backport to 7.4. As with all backported bugfixes, we aim to soak the change on the most recent version before we backport. The goal of soaking is to 100% verify that there are no negative flow-on impacts. For this reason, you can expect this fix to make it to 7.4 over the coming months. We will update the fix version of this bug once that happens. So keep an eye on this for details on when this change is shipped.

            Regards,

            Matthew

            Product Manager | Confluence Server & DC

            Matthew Saxby (Inactive) added a comment - Hi All, Thanks for all your feedback after we have closed this bug. I want to apologise again for all the pain it has caused you and your organisation. I want to assure you all that yes, this is a high priority bug that we do plan to backport to 7.4. As with all backported bugfixes, we aim to soak the change on the most recent version before we backport. The goal of soaking is to 100% verify that there are no negative flow-on impacts. For this reason, you can expect this fix to make it to 7.4 over the coming months. We will update the fix version of this bug once that happens. So keep an eye on this for details on when this change is shipped. Regards, Matthew Product Manager | Confluence Server & DC

            Marina added a comment - - edited

            Dear Atlassian support, could you please reply, if the issue will be tackled on 7.4 LTS release? My concern is this bug is already in close state and most probably won't be touched again! Therefore, i'd suggest to create a new bug asap. Looking forward to your reply! Thanks.

            Marina added a comment - - edited Dear Atlassian support, could you please reply, if the issue will be tackled on 7.4 LTS release? My concern is this bug is already in  close state and most probably won't be touched again ! Therefore, i'd suggest to create a new bug asap. Looking forward to your reply! Thanks.

            This bug just caused an hour downtime to fix in our Data Center 7.4.1 on Oct 7th.

            It happened on restarting the application - without changing any of the plugins.

            Since its a random race condition, that can happen anytime we restart, I want to see it added to the 7.4 LTS.

            Joe Jadamec added a comment - This bug just caused an hour downtime to fix in our Data Center 7.4.1 on Oct 7th. It happened on restarting the application - without changing any of the plugins. Since its a random race condition, that can happen anytime we restart, I want to see it added to the 7.4 LTS.

            Claudio Ghisi added a comment - - edited

            I agree with the above comments, we'd need a fix too for the 7.4 LTS

            Claudio Ghisi added a comment - - edited I agree with the above comments, we'd need a fix too for the 7.4 LTS

            Karen added a comment -

            Alex, I agree with Marina we need this fix to be available in 7.4 LTS release

            Karen added a comment - Alex, I agree with Marina we need this fix to be available in 7.4 LTS release

            Marina added a comment -

            thank you Alex K, but can the fix be available also in 7.4 LTS release please?

            Marina added a comment - thank you Alex K, but can the fix be available also in 7.4 LTS release please?

            Alex K added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 7.8.1
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Alex K added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 7.8.1 Upgrade now or check out the Release Notes to see what other issues are resolved.

            I agree with aryhe.segal576432212. This is a problem that can cause limited functionality in enterprise instance and create production downtime to correct the issue. Updating a plugin should NOT cause other plugins to be mysteriously disable. You workaround is pretty involved. Enterprises need to be delivered from sort of manual process. 

            Steve Hadfield added a comment - I agree with aryhe.segal576432212 . This is a problem that can cause limited functionality in enterprise instance and create production downtime to correct the issue. Updating a plugin should NOT cause other plugins to be mysteriously disable. You workaround is pretty involved. Enterprises need to be delivered from sort of manual process. 

            Can you please make this fix also available on next Enterprise version of 7.4.5? ... So we won't experience it again.
            Thanks.

            Aryhe Segal added a comment - Can you please make this fix also available on next Enterprise version of 7.4.5? ... So we won't experience it again. Thanks.

            We have upgraded to DC v7.4 and experienced this issue.  It appears many customers on the Long Term Support version 7.4 are experiencing this issue.  Is consideration being given to put this fix into version 7.4.

            Karen.Mustain added a comment - We have upgraded to DC v7.4 and experienced this issue.  It appears many customers on the Long Term Support version 7.4 are experiencing this issue.  Is consideration being given to put this fix into version 7.4.

            We upgraded to DC v 7.4.3. This version also has this issue.

            Bivhor Shrestha added a comment - We upgraded to DC v 7.4.3. This version also has this issue.

            Have experienced this on 3 nodes in a 4 node Confluence DC cluster. v7.4.0

            Greg Warner added a comment - Have experienced this on 3 nodes in a 4 node Confluence DC cluster. v7.4.0

            This issue reoccurred again. twice within a week. Confluence v7.4.0.

            Bivhor Shrestha added a comment - This issue reoccurred again. twice within a week. Confluence v7.4.0.

            We have had this issue twice in the past 2 months (running DC 7.4.0). Do we have a timeline on the fix?

            Bivhor Shrestha added a comment - We have had this issue twice in the past 2 months (running DC 7.4.0). Do we have a timeline on the fix?

            We got this issue today Aug 25, 2020. we are at confluence 7.3.3 version

            kirtan-shah added a comment - We got this issue today Aug 25, 2020. we are at confluence 7.3.3 version

            Ioannis Stefanidis added a comment - We have also same problem with 7.0.1 version. did you use instructions on doc https://confluence.atlassian.com/confkb/comment-box-disappears-soytemplaterendererhelper-getrenderedtemplatehtml-296096549.html?_ga=2.214152149.353576802.1578649789-164301129.1578649789 to fix it, or other workaround?

            we just fixed a similar problem on our 7.0.2 instance - the bug still exists!

            tothjozsef added a comment - we just fixed a similar problem on our 7.0.2 instance - the bug still exists!

            mtran@atlassian.com, this race condition still exists in Confluence 6.0.

            Deleted Account (Inactive) added a comment - mtran@atlassian.com , this race condition still exists in Confluence 6.0.

            Minh Tran added a comment -
            Atlassian update

            Thank you for taking the time to raise, comment or vote on this Bug. Currently this bug indicates that it only impacts a version of Confluence which is no longer in support, therefore we are closing this issue as Timed Out.
            If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue.
            Thanks again.
            Regards,
            Confluence Development

            Minh Tran added a comment - Atlassian update Thank you for taking the time to raise, comment or vote on this Bug. Currently this bug indicates that it only impacts a version of Confluence which is no longer in support, therefore we are closing this issue as Timed Out. If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue. Thanks again. Regards, Confluence Development

            AJ added a comment -

            Hi Scott, I deleted my comment before I saw you had replied as I eventually got this to work (after restoring the table) by manually copying the plugins folder back. However given this issue could reoccur I'm grateful for your response. Kind regards, Adrian

            AJ added a comment - Hi Scott, I deleted my comment before I saw you had replied as I eventually got this to work (after restoring the table) by manually copying the plugins folder back. However given this issue could reoccur I'm grateful for your response. Kind regards, Adrian

            isoiso628, I posted an alternative answer back on the question you were commenting on at Stack Overflow. (In addition to deleting your comments, the moderators also deleted my previous "Warning! This is dangerous!" edit to the other user's incorrect answer that caused you to lose your entire bandana table...but I added a new answer that includes a safe way to fix it.)

            Scott Dudley [Inactive] added a comment - isoiso628 , I posted an alternative answer back on the question you were commenting on at Stack Overflow . (In addition to deleting your comments, the moderators also deleted my previous "Warning! This is dangerous!" edit to the other user's incorrect answer that caused you to lose your entire bandana table...but I added a new answer that includes a safe way to fix it.)

            See this comment from Arsenale.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - See this comment from Arsenale.

            this would be a valuable fix. I got three Velocity Helper components in my plugin, which get switched off randomly during installation and/or restart. It irritates a client of ours quite a bit.

            David Voňka added a comment - this would be a valuable fix. I got three Velocity Helper components in my plugin, which get switched off randomly during installation and/or restart. It irritates a client of ours quite a bit.

              richatkins Richard Atkins
              7c60ab039b09 Scott Dudley [Inactive]
              Affected customers:
              24 This affects my team
              Watchers:
              69 Start watching this issue

                Created:
                Updated:
                Resolved: