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

Duplicate Content When Updating Page Via REST Whilst Collaborative Editor Is Open

      Issue Summary

      When editing a page with the collaborative editor, a request to update the page via the REST API will result in duplicated content. This REST update is a seperate action unrelated to the editor.

      Generally only content that has been entered into the editor, and not yet published will be duplicated.

      Steps to Reproduce

      1. Create a page with some content, then publish the page
      2. Edit the page and add some additional content, do not yet publish the page
      3. Obtain the content of the draft using the REST API
        Get Draft Content
        GET /content/<content-id>?expand=body.storage&status=draft
        
      4. Add additional content to the recently obtained content, and POST it back to Confluence using
        Update Page Content
        PUT /content/<content-id>?status=draft  { "type": "page", "version": {"number": 1}, "space": {"key": "KEYS"}, "status": "current", "title": "Page Title", "body": { "storage": { "value": "<p>already published content</p><p><br /></p><p>some</p><p>new</p><p>changes</p><p>done</p><p>manually</p><p><br /></p><p>API UPDATE</p>", "representation": "storage" } } }
        
      5. Head back to the editor and note the duplicated content
      6. Publish the page and note the content is still duplicated

      Expected Results

      Confluence should reconcile the difference between the new REST content and the existing content in the editor.

      Actual Results

      Confluence doesn't correctly reconcile the difference between the REST content and the editor content, resulting in duplicated data.

      Workaround

      Currently the only workaround is to go back and edit the page to remove the duplicated content. Rolling back to a previous version will result in the loss of content added to the editor but not yet published.

      Note

      Whilst this issue presents in a similar fashion to CONFSERVER-59227: Duplicate content shown when editing a page, it is unrelated.

            [CONFSERVER-64758] Duplicate Content When Updating Page Via REST Whilst Collaborative Editor Is Open

              Unassigned Unassigned
              jponting James Ponting
              Affected customers:
              14 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated: