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

CDATA tags are randomly inserted into JavaScript code generated on pages with Confifroms plugin after upgrading to Confluence 8 versions breaking the page functionality

    • Icon: Bug Bug
    • Resolution: Incorrectly Filed
    • Icon: High High
    • None
    • 8.0.3, 8.1.1
    • Macros - 3rd Party
    • None

      Issue Summary

      After upgrading to Confluence 8 versions the CDATA tag is randomly inserted into JavaScript code generated on pages containing Confiforms plugin that breaks page functionality like search box, space tools, or page tree navigator.

      This is reproducible on Data Center: yes only using Confiforms plugin.

      Steps to Reproduce

      1. Install Confluence 8.0.3 + PostgreSQL and add Confiforms plugin to the instance.
      2. Create pages with file names as page titles using attached storage formats SUPPORT-4737 and SUPPORT-4737 - listpages.txt
      3. Click on 'Register List groups' button SUPPORT-4737 page and add dummy data (eg, Name: test1) and save the form.
      4. Repeat the above Step 4 for 3 more times
      5. Monitor the console logs for below similar error:
        Uncaught SyntaxError: Unexpected token ']' (at SUPPORT-4737:2251:1)
        

      Expected Results

      The page should load without any issues with Confiforms plugin.

      Actual Results

      The below error is observed in broswer console logs:

      Uncaught SyntaxError: Unexpected token ']' (at SUPPORT-4737:2251:1)
      

      Snippet from the JavaScript generated by Confiforms showing ]]><![CDATA[ inserted randomly:

      AJS.$(selector).each(function () {
      ]]><![CDATA[                  applySearchExpression(AJS.$(this), query) ?
                            AJS.$(this).show().removeClass('invisible').addClass('ensureTRDisplayed') : AJS.$(this).hide().addClass('invisible').removeClass('ensureTRDisplayed');
                      });
      

      The error is not seen in browser console.log when the Confiforms plugin is disabled which breaks the pages with only the plugin functionality unavailable.

      Workaround

      Currently there is no known workaround for this behaviour. A workaround will be added here when available

            [CONFSERVER-82558] CDATA tags are randomly inserted into JavaScript code generated on pages with Confifroms plugin after upgrading to Confluence 8 versions breaking the page functionality

            Yep, I'm sure that they mention that full fix is on Confluence 8.3.0

            Rafał Żydek added a comment - Yep, I'm sure that they mention that full fix is on Confluence 8.3.0

            Obviously this is not fixed in 8.1.3 with Confiforms plug-in. 

             

            e @ VM3628 batch.js:201
            y @ VM3628 batch.js:201
            i @ VM3628 batch.js:201
            safeRequire @ VM3628 batch.js:277
            (anonymous) @ VM3628 batch.js:2430
            VM3634 editpage.action:4 Uncaught SyntaxError: Unexpected token ',' (at VM3634 editpage.action:4:18)
            VM3628 batch.js:2122 DEPRECATED JS - PopulateParameters has been deprecated since 9.0.0 and will be removed in 10.0.0.  
                 at HTMLDocument.<anonymous> (https://sd-27s0-iqnv.nam.nsroot.net:8443/confluence/s/9785d153e1e74498bbbe2d76d1ac63a1-CDN/v37nkc/9003/dzpzrn/5828f2650a2e66eda17737295376c91a/_/download/contextbatch/js/_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer/batch.js?locale=en-US:2277:1307)
            i @ VM3628 batch.js:2122
            (anonymous) @ VM3628 batch.js:2122
            (anonymous) @ VM3628 batch.js:2122
            (anonymous) @ VM3628 batch.js:2277
            i @ VM3628 batch.js:126
            fireWith @ VM3628 batch.js:126

            Sandi Ameen added a comment - Obviously this is not fixed in 8.1.3 with Confiforms plug-in.    e @ VM3628 batch.js:201 y @ VM3628 batch.js:201 i @ VM3628 batch.js:201 safeRequire @ VM3628 batch.js:277 (anonymous) @ VM3628 batch.js:2430 VM3634 editpage.action:4 Uncaught SyntaxError: Unexpected token ',' (a t VM3634 editpage.action:4:18) VM3628 batch.js:2122 DEPRECATED JS - PopulateParameters has been deprecated since 9.0.0 and will be removed in 10.0.0.        at HTMLDocument.<anonymous> ( https://sd-27s0-iqnv.nam.nsroot.net:8443/confluence/s/9785d153e1e74498bbbe2d76d1ac63a1-CDN/v37nkc/9003/dzpzrn/5828f2650a2e66eda17737295376c91a/_/download/contextbatch/js/_super,-com.atlassian.plugins.atlassian-plugins-webresource-rest:data-collector-perf-observer/batch.js?locale=en-US:2277:1307 ) i @ VM3628 batch.js:2122 (anonymous) @ VM3628 batch.js:2122 (anonymous) @ VM3628 batch.js:2122 (anonymous) @ VM3628 batch.js:2277 i @ VM3628 batch.js:126 fireWith @ VM3628 batch.js:126

            Hi All,

            I'm closing this as incorrectly filed as the bug incorrectly describes the problem.

            Please see CONFSERVER-82785: Macro HTML bodies longer than 64k characters may exhibit split CDATA sections and/or corrupt JavaScript elements if you believe this issue impacts you.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, I'm closing this as incorrectly filed as the bug incorrectly describes the problem. Please see CONFSERVER-82785: Macro HTML bodies longer than 64k characters may exhibit split CDATA sections and/or corrupt JavaScript elements if you believe this issue impacts you. Thanks, James Ponting Engineering Manager - Confluence Data Center

            OH yes!Unable to render embedded object: File (  I can see this in my logs over and over) not found.!    Please esclate and repair, this is hard blocker - with moving Confluence 8 to production.  For us Confluence 8 solves problems for our compliance and security teams. 

            Best Regards, 

            Sandi Ameen

            CitiBank

            Sandi Ameen added a comment - OH yes! Unable to render embedded object: File (  I can see this in my logs over and over) not found. !    Please esclate and repair, this is hard blocker - with moving Confluence 8 to production.  For us Confluence 8 solves problems for our compliance and security teams.  Best Regards,  Sandi Ameen CitiBank

              Unassigned Unassigned
              188bae873138 Saurabh
              Affected customers:
              6 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: