After enabling, installing, or updating a plugin, macro velocity code is visible in Confluence UI
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
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.
環境
Confluence 8 or later.
診断
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):
原因
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.
ソリューション
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.