-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 6.14.0, 6.15.6, 7.0.1
-
Component/s: Content - Blueprints / Templates, Editor - Core
-
None
-
7
-
Severity 3 - Minor
-
2
Summary
In Confluence 6.14.0, we made improvements to Confluence Editor. This change broke the ability of copying a Confluence variable (template) to the same or another template as it consider the variable as an image.
Steps to Reproduce
- Install Confluence 6.14.0 or later
- Go to Global Templates and Blueprints page
- Click on Add global page template and name it TemplateTest
- Create a variable (using the $ shortcut) as $test
- Copy and paste the variable on the same page
- Save the template
- Click on the Create from Template button (. . .)
- Choose the TemplateTest and notice that it's broken
To confirm the problem, install an earlier version of Confluence, for example 6.13.x and follow the same steps, you will notice that the problem is not replicable
Expected Results
The variables are working
Actual Results
The manually created variable works and the copied variable shows up as an image
Inspecting the HTML
If we inspect the HTML via the browser console, we have the following results:
Variables in 6.14.0 while in editor mode (editing the template)
- Working variable:
<img alt="$test" class="template-variable" data-variable-name="test" src="/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test" data-mce-src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test">
- Copied variable:
<img class="confluence-embedded-image template-variable confluence-external-resource" src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test" data-image-src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test" data-mce-src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test">
- Notice the new attribute data-image-src and missing attribute: data-variable-name.
Variables in 6.14.0 while in editor mode (using the template to create a page)
- Working variable:
<input class="page-template-field" name="variableValues.test" size="12" type="text"> - working
- Copied variable:
<img class="confluence-embedded-image template-variable confluence-external-resource" src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test" data-image-src="http://localhost:8090/confluence/plugins/servlet/confluence/placeholder/template-variable?name=test">
Same variables on a Confluence 6.13.0 while in editor mode (editing the template)
- Working variable:
<img class="template-variable" alt="$test" data-variable-name="test" src="/c6130/plugins/servlet/confluence/placeholder/template-variable?name=test" data-mce-src="http://localhost:26130/c6130/plugins/servlet/confluence/placeholder/template-variable?name=test">
- Copied variable:
<img class="template-variable" title="$test" src="http://192.168.10.227:26130/c6130/plugins/servlet/confluence/placeholder/template-variable?name=test" data-variable-name="test" alt="$test" data-attachment-copy="" data-mce-src="http://192.168.10.227:26130/c6130/plugins/servlet/confluence/placeholder/template-variable?name=test">
- Notice that there are no changes that would break it.
Variables in 6.13.0 while in editor mode (using the template to create a page)
- Working variable:
<input class="page-template-field" name="variableValues.test" size="12" type="text">
- Copied variable:
<input class="page-template-field" name="variableValues.test" size="12" type="text">
Workaround
Manually add the variable instead of copying it