-
Bug
-
Resolution: Fixed
-
Low
-
7.13.2
-
3
-
Severity 3 - Minor
-
-
CtB - Improve Existing
Issue Summary
Clicking on the Source Editor button does not work and throws an error:
The source editor requires Confluence 4.1.5 or greater.
The error pops up regardless of running a recent Confluence version.
Steps to Reproduce
- Install a recent Confluence version (such as 7.13.4 LTS or latest)
- Install the Confluence Source Editor App version 2.0.0 (or latest)
- Hide the version information by executing the steps in How to Hide Version Information on Confluence
- Restart Confluence
- Create a new Page (or Edit an existing Page)
- Click on the Source Editor button (with a "<>" symbol)
Expected Results
Users are able to edit Pages via the Source Editor successfully.
Actual Results
The Source Editor will not work and a pop-up error will be displayed.
Cause
The Source Editor checks compatibility via the "version-number" value:
function isMinimumVersion() { var version = Meta.get('version-number'); var versionParts = version.split('.'); if (version.indexOf('SNAPSHOT') >= 0) return true; // always allow snapshot at own peril var major = parseInt(versionParts.length > 0 && versionParts[0] || 0); var minor = parseInt(versionParts.length > 1 && versionParts[1] || 0); var patch = parseInt(versionParts.length > 2 && versionParts[2] || 0); // Min version = 4.1.5 if (major > 4) return true; if (major === 4 && minor >= 2) return true; if (major === 4 && minor === 1 && patch >= 5) return true; return false; }
As it was obfuscated and hard-coded to "1" it will fail the condition every time and return a False regardless of the Confluence version being compatible.
Workaround
Use a value of "99.99" that will both satisfy the condition and also obfuscate the Confluence version - or revert the steps covered under How to Hide Version Information on Confluence.