Comment box disappears: $soyTemplateRendererHelper.getRenderedTemplateHtml
Problem
The comment box disappears from all Confluence pages and instead, it is replaced by the following code that is not parsed:
$soyTemplateRendererHelper.getRenderedTemplateHtml("com.atlassian.confluence.plugins.quickcomments:quick-comment-initial", "Confluence.Templates.Comments.displayTopLevelCommentEditorPlaceholder.soy", $templateParameters)
Image 1 - Issue:
Cause
The "Confluence Soy Template Renderer for Velocity" module (soyTemplateRendererHelperContext) for "Confluence Soy Template Support" plugin gets disabled.
The behavior is described on the following but tracker:
-
CONFSERVER-22390Getting issue details...
STATUS
Resolution
Re-enabling the affected module should get rid of the issue.
Image 2 - Plugin:
Image 3 - Module:
PS: also ensure that all modules for "Confluence Soy Template Support" plugin are enabled.
Option 1 - REST API (no downtime)
Sending REST API calls via CURL to Confluence and re-enabling the affected modules will fix the issue without downtime.
This is our recommended approach.
Set the following session variables with current values:
CONFLUENCE_BASE_URL=<Confluence Base URL> ADMIN_USRNAME=<local admin account username> ADMIN_PWD=<local admin account password>
Fetch the UPM Token:
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')
Run the following command:
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 '{"key":"soyTemplateRendererHelperContext","completeKey":"com.atlassian.confluence.plugins.soy:soyTemplateRendererHelperContext","links":{"self":"/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key/modules/soyTemplateRendererHelperContext-key","modify":"/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key/modules/soyTemplateRendererHelperContext-key","plugin":"/rest/plugins/1.0/com.atlassian.confluence.plugins.soy-key"},"enabled":true,"optional":false,"name":"Confluence Soy Template Renderer for Velocity","recognisableType":true,"broken":false}'
Once done, the comment boxes should re-appear.
Option 2 - Database (requires downtime)
If you are having trouble enabling the module, you may do the following:
- Shutdown Confluence
- Backup your database
Run the following SQL query (this will set all plugin modules back to their default enabled/disabled state, so be sure to check that all plugins are functioning as expected, especially the HTML Macros if you have them enabled):
UPDATE BANDANA SET BANDANAVALUE='<map/>' WHERE BANDANAKEY='plugin.manager.state.Map'
- Delete the following cache folders:
<confluence_home>/plugins-osgi-cache
<confluence_home>/bundled-plugins
<confluence_home>/plugins-temp
<confluence_home>/plugins-cache
<confluence-home>/bundled-plugins_language
- Start Confluence. The cache folders will be recreated and the plugins will be rebuilt
- Check all your plugins are working as expected