Issue "description" field is showing the HTML code and won't allow any free text

Jeffrey Melies October 8, 2015

I'm in the process of upgrading from 5.0.7 to 6.4.11 and came across an problem where if I attempt to create a new issue, the "description" field is showing the HTML code and won't allow any free text, this is happening in all projects. 

I verified the renderer is set to "Wiki Style Renderer" in the "Field Configuration" of several projects, not sure what else to check. any help would be greatly appreciated.

 

This is what the description box is showing when trying to create a new issue:

<div class="wiki-edit">    <div id="description-wiki-edit" class="wiki-edit-content">                                 <textarea  class="textarea long-field wiki-textfield" cols="9999" id="description"  name="description" rows="10" wrap="virtual"  ></textarea>                <div class="content-inner">                    </div>    </div>< /div>< div class="field-tools">    <dl id="wiki-prefs" class="wiki-js-prefs" style="display:none">        <dt>trigger</dt>        <dd>description-preview_link</dd>        <dt>fieldId</dt>        <dd>description</dd>        <dt>fieldName</dt>        <dd>Description</dd>        <dt>rendererType</dt>        <dd>atlassian-wiki-renderer</dd>        <dt>issueKey</dt>        <dd></dd>    </dl>    <button class="jira-icon-button fullscreen" id="description-preview_link" type="button"><span class="aui-icon wiki-renderer-icon">Preview description</span></button>    <a class="help-lnk" id="viewHelp" href="/secure/WikiRendererHelpAction.jspa?section=texteffects" title="Get local help about wiki markup help" data-helplink="local"><span class="aui-icon aui-icon-small aui-iconfont-help"></span></a>< /div>

4 answers

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

The reason is because HTML/Javascript in the description field was disabled starting from Confluence version 6.2.x: https://confluence.atlassian.com/jira/fields-allowing-custom-html-or-javascript-224401453.html

From 6.2 onwards, HTML/Javascript can only be stored in the announcement banner.

Jeffrey Melies October 9, 2015

We don't have any javascript in our description field, however I did make the stupid mistake of replacing the description-edit.vm file, following a previous install step, but I was able to find online what I think the original file should include, can you please confirm, this is for Jira 6.4.11 description-edit.vm: #controlHeader ($action $field.id $i18n.getText($field.nameKey) $fieldLayoutItem.required $displayParameters.get('noHeader')) ## setup some additional parameters $!rendererParams.put("rows", "12") $!rendererParams.put("wrap", "virtual") ## let the renderer display the edit component $rendererDescriptor.getEditVM($!description, $!issue.key, $!fieldLayoutItem.rendererType, $!field.id, $!field.name, $rendererParams, false) #controlFooter ($action $fieldLayoutItem.getFieldDescription() $displayParameters.get('noHeader')) So I stopped the service and restarted but have the same results.

Chris Whitten [Comskil] October 12, 2015

Jeff, I think you are missing a few lines. Check my comment above for this file

0 votes
Chris Whitten [Comskil] October 8, 2015

Can you please also make sure the Wiki Renderer Macros system Plugin is enabled?

Were you using the TINY MCE plugin or any other that helped with editing HTML markup?

Jeffrey Melies October 9, 2015

I verified the Wiki Renderer plugin is enabled, 7 of 8 modules are enabled The html is disabled and says: Use HTML code within a JIRA Issue. Do not enable unless you understand the XSS security implications.

Chris Whitten [Comskil] October 12, 2015

Is your install behind a firewall of some kind and only available internally? Could you try enabling the final system plugin and say how this affects your problem?

Chris Whitten [Comskil] October 12, 2015

Also what vm files did you end up customizing?

Chris Whitten [Comskil] October 12, 2015

Also here is the default decription-edit.vm file I have: #disable_html_escaping() #customControlHeader ($action $field.id $i18n.getText($field.nameKey) $fieldLayoutItem.required $displayParameters $auiparams) ## setup some additional parameters $!rendererParams.put("class", "long-field") $!rendererParams.put("rows", "12") $!rendererParams.put("wrap", "virtual") #if ($mentionable) $!rendererParams.put("mentionable", true) #if ($issue.project.key && $issue.project.key != "") $!rendererParams.put("data-projectkey", "$!issue.project.key") #end #if ($issue.key && $issue.key != "") $!rendererParams.put("data-issuekey", "$!issue.key") #end #end ## let the renderer display the edit component $rendererDescriptor.getEditVM($!description, $!issue.key, $!fieldLayoutItem.rendererType, $!field.id, $field.name, $rendererParams, false) #customControlFooter ($action $field.id $fieldLayoutItem.getFieldDescription() $displayParameters $auiparams)

Jeffrey Melies October 12, 2015

I ended up uninstalling/re-installing to clear it up, I'm sure it was due to the modified .vm file, your code would probably have fixed it if I got it a little sooner. Thank you Chris

0 votes
Jeffrey Melies October 8, 2015

It did complete without any errors, it was a clean install on a new server, then I performed a refresh from our production environment and it had some warnings but nothing indicating this.

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

Might be a problem with the upgrade. Did it completed without any errors?

Suggest an answer

Log in or Sign up to answer