After enabling, installing, or updating a plugin, macro velocity code is visible in Confluence UI

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

After enabling/installing/updating a Confluence plugin in Confluence 8 or later, some data is not rendered properly and the users can observe macro Velocity code lines in the Confluence UI. 

If one plugin gets disabled, for example due to a expired license, re-enabling that plugin could trigger this issue as well. 

Environment

Confluence 8 or later.

Diagnosis

(warning) When running a Confluence cluster, this issue can be observed in some nodes of the cluster but not in others. Not all the nodes may be affected. There are multiple symptoms related to this issue:

  • The most common one, the Confluence sidebar shows incorrect links for the page tree, most of them (or all of them) replaced by #contentLink2 ($p false false)

  • There might be a macro code line on top of the Confluence menu bar related to requireResourceForContext(....)
  • Some of our Confluence Admin pages may show macro code line such as requireResource("confluence.web.resources:pagination-styles) or #form_xsrfToken():

     
  • At the bottom of your Confluence page, you might see a macro code line such as #webPanelForLocation('atl.confluence.grant.access' $action.context... or #webPanelForLocation('atl.confluence.grant.access' $action.context) 

  • When editing a Confluence page, you might notice a macro code line such as #webPanelForLocation("atl.editor" $context) 
  • The login prompt shows #assistiveLegend("accessibility.form.login")and #fielderrorAUI($parameters.name): 

Cause

Since there were major platform upgrades in Confluence version 8, some of them affecting (Atlassian Universal Plugin Manager) UPM, Confluence Cloud Migration Assistant (CCMA) or other 3rd party plugins.

Among those changes, there is a change related to how to the plugins obtain the VelocityEngine. This is tracked under: CONFSERVER-81006 - Plugins are unable to obtain the VelocityEngine used by Struts.

There is as well a bug raised for the actual effect of previous bug in Confluence side: CONFSERVER-93390 - Confluence intermittently displays #contentlink2 ($P false false) while uploading/installing/updating/enabling plugin.

Solution

The solution to fix these bugs is to upgrade your Confluence installation to one of the fixed versions. At the point of writing this article, the fixed versions are Confluence 8.5.5 and Confluence 8.8.0.


As a workaround, all the previous symptoms disappear either after clearing the Plug-ins cache, or enabling Safe Mode to restart all plugins. Restarting Confluence has the same effect as enabling/disabling safe mode since it restarts all plugins as well.

Last modified on Jan 24, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.