Updating a page via REST API corrupts the shared draft if the page had an unpublished draft

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 7.4.6, 7.12.0
    • Component/s: Editor - Drafts
    • None
    • 3
    • Severity 3 - Minor
    • 0

      Issue Summary

      When a page with an unpublished draft is updated via REST API, the subsequent attempt to edit the page will result in the shared draft to produce text that is a combination of the unpublished draft + the latest version of the page.

      Steps to Reproduce

      1. Create a page with the text "confluence".
      2. Edit the page and replace the text to "jira".
      3. Close the editor and let it remain as an unpublished draft.
      4. Run an API call (PUT rest/api/content/12345) to update this page to the text "bitbucket".
        {
            "id": "12345",
            "status": "current",
            "version": {
                "number": 2
            },
            "space": {
                "key": "TEST"
            },
            "type": "page",
            "title": "Test page",
            "body": {
                "storage": {
                    "value": "<p>bitbucket</p>",
                    "representation": "storage"
                }
            }
        } 
      5. Refresh the page in the UI and you will see that the text switched from "confluence" to "bitbucket" in View mode.
      6. Click on 'Edit' to edit the page.

      Expected Results

      The page editor should have been updated to reflect the same content as in View mode.

      bitbucket

      Actual Results

      The page editor shows this as the shared draft:

      bitbkjirat

      Workaround

      Ensure that before you update the page via API, all unpublished drafts are published first. This will then result in the page and draft to be correctly updated.

            Assignee:
            Mark M (Inactive)
            Reporter:
            Athirah Zolkefli (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: