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

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

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

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.

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?

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.

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?

Also what vm files did you end up customizing?

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)

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
Stephen Deutsch Community Champion Oct 08, 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.

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

50 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you