Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-77941

Source Editor does not work when Confluence version information is hidden

      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

      1. Install a recent Confluence version (such as 7.13.4 LTS or latest)
      2. Install the Confluence Source Editor App version 2.0.0 (or latest)
      3. Hide the version information by executing the steps in How to Hide Version Information on Confluence
      4. Restart Confluence
      5. Create a new Page (or Edit an existing Page)
      6. 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.

        1. Screen Shot 2022-03-01 at 14.49.49.png
          693 kB
          Thiago P [Atlassian Support]
        2. Screen Shot 2022-03-01 at 18.47.01.png
          966 kB
          Thiago P [Atlassian Support]

            [CONFSERVER-77941] Source Editor does not work when Confluence version information is hidden

            Zac Xu made changes -
            Fix Version/s Original: SourceEditor-19.3.22 [ 110442 ]
            Fix Version/s New: SourceEditor-19.3.29 [ 110490 ]
            Zac Xu made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Zac Xu made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Zac Xu made changes -
            Status Original: Needs Triage [ 10030 ] New: In Progress [ 3 ]
            Zac Xu made changes -
            Resolution Original: Fixed [ 1 ]
            Status Original: Closed [ 6 ] New: Needs Triage [ 10030 ]
            Zac Xu made changes -
            Fix Version/s New: SourceEditor-19.3.22 [ 110442 ]
            QA Demo Status Original: Not Done [ 14330 ] New: Not Needed [ 14332 ]
            Resolution New: Fixed [ 1 ]
            Status Original: In Review [ 10051 ] New: Closed [ 6 ]
            Zac Xu made changes -
            Assignee New: Zac Xu [ zxu2@atlassian.com ]
            Zac Xu made changes -
            Link New: This issue relates to CONFSRVDEV-33823 [ CONFSRVDEV-33823 ]
            Zac Xu made changes -
            Remote Link New: This issue links to "Confluence Bundled Plugins 719 › Confluence Public Plugins › issue-719-CONFSERVER-77941-remove-version-detection (server-syd-bamboo)" [ 966439 ]
            Zac Xu made changes -
            Remote Link New: This issue links to "Confluence Bundled Plugins 85 › Confluence Public Plugins › issue-85-CONFSERVER-77941-remove-version-detection (server-syd-bamboo)" [ 966438 ]

              zxu2@atlassian.com Zac Xu
              tpallaro@atlassian.com Thiago P [Atlassian Support]
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: