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

Contents with bullets or task list inside templates get erased automatically after saving the template

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • 8.8.0, 8.5.7
    • 8.3.0, 8.4.0, 8.3.1, 8.6.0, 8.4.1, 8.5.1, 8.5.2, 8.6.1, 8.3.3, 8.5.3, 8.3.4, 8.4.4, 8.5.4, 8.6.2, 8.7.1, 8.7.2, 8.5.5, 8.5.6

      The fix for this bug has been released to our Long Term Support release.

      The fix for this bug is now available in the latest release of Confluence 8.5

      Issue Summary

      Contents with bullets inside templates get erased automatically after saving the template.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Go to Space Tools > Content tools
      2. Create a new user created template or global template
      3. Add contents with bullets(numbered or unnumbered) and also just texts without any bullets
      4. Save the template and click on edit again
      5. You will notice the contents with bullets are erased along with the text and only the text without any bullets will be present.

      The same happens with the task list as well.

      This issue does not exist for Confluence version < 8.3.0

      Expected Results

      All the contents inside the template must be present.

      Actual Results

      The contents with bullets are erased along with the text and only the text without any bullets will be present.

      Workaround

       

      Workaround 1 (For new template only)

      Add at least one template variable in the template will prevent the bullets / task lists been removed

       

       

      Workaround 2 (For both existing and new template) - Global site administration permission required

      In order to prevent any users mistakenly editing the existing template to cause the list been removed, custom javascript is required to manipulate the source content when template DOM is loaded.

       

      Goto "Confluence administration" > "Custom HTML": add below JavaScript code in "At end of the BODY" and save. Now editing existing template or add new template will not remove the list

       

      <script>
      document.addEventListener('DOMContentLoaded', function() {
        function changeTextareaContent() {
          const editTemplateForm = document.getElementById('editpagetemplate');
          const textarea = document.getElementById('wysiwygTextarea');
          if (editTemplateForm && textarea && textarea.value) {
            textarea.value = textarea.value.replace('<ul data-variable-declarations="true" />', "");
          } 
        }
        changeTextareaContent();
      });
      </script>

       

       

            [CONFSERVER-90481] Contents with bullets or task list inside templates get erased automatically after saving the template

            Hi All,

            The fix is now available in Confluence 8.5.7.

            Thanks,
            James Ponting
            Engineering Manager - Confluence Data Center

            James Ponting added a comment - Hi All, The fix is now available in Confluence 8.5.7. Thanks, James Ponting Engineering Manager - Confluence Data Center

            Can we expect that the fix will be backported to LTS? We're running 8.5.6 and it's very annoying to explain this to our users all the time.

            Regards,

            Mike

            Michael Kotzem added a comment - Can we expect that the fix will be backported to LTS? We're running 8.5.6 and it's very annoying to explain this to our users all the time. Regards, Mike

            So current LTS can expect it when?

            Michael Potaczala added a comment - So current LTS can expect it when?

            A fix for this issue is available in Confluence Data Center 8.8.0.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Aakash Jain added a comment - A fix for this issue is available in Confluence Data Center 8.8.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Affected on v8.5.5 as well

             

            Thanks,

            Phanidhar

            Phani Kumar added a comment - Affected on v8.5.5 as well   Thanks, Phanidhar

            we use confluence 8.7.1 and that version is affected (to us)

            Claus Westerkamp added a comment - we use confluence 8.7.1 and that version is affected (to us)

            Franco Skrzypczak added a comment - - edited

            This ticket will get backported to Confluence 8.5.x 

             

            Franco Skrzypczak added a comment - - edited This ticket will get backported to Confluence 8.5.x   

            Babu R added a comment -

            Is this fix getting backported to 8.5.x ?

            Babu R added a comment - Is this fix getting backported to 8.5.x ?

            Wow Jeffery, thank you for the second workaround! Seems to work like a charm, for existing templates too.

            Great work!

            Artem Chatlikov added a comment - Wow Jeffery, thank you for the second workaround! Seems to work like a charm, for existing templates too. Great work!

            Quin Dixon added a comment -

            Just updated Confluence DC from 8.5.3 > 8.5.4.  Confirmed that this bug still exists in 8.5.4.

            Quin Dixon added a comment - Just updated Confluence DC from 8.5.3 > 8.5.4.  Confirmed that this bug still exists in 8.5.4.

              20f00d30f8b9 Franco Skrzypczak
              b16cacd1db0f Pushpanjali Shivaramu
              Affected customers:
              39 This affects my team
              Watchers:
              53 Start watching this issue

                Created:
                Updated:
                Resolved: