Comment box disappears: $soyTemplateRendererHelper.getRenderedTemplateHtml
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
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-22390
-
Getting 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