Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-58270

Confluence might show blank content or an old version of a page when an user tries to edit a page with Collaborative Editing enabled

    XMLWordPrintable

Details

    Description

      Issue Summary

      When Collaborative Editing is enabled in Confluence and users try to edit a page, they might hit a bug on which a blank page is shown in the editor.
      Sometimes, it is not a blank page, but an old version of it.

      Environment

      This bug was reproduced on 6.6, 6.13 and 6.15.4.
      Although not tested, this should affected any version from 6.0 onward.

      Steps to Reproduce

      Below are described two ways to hit this bug, but with different characteristics to user, although the bug trigger is the same.
      Because of simplicity, the first option might be more common than the other, which is when the user sees a blank page when accessing the editor.

      Option 1

      1. Install a vanilla instance of Confluence.
      2. Publish a new page with no content.
        • If you check records related to this page in the CONTENT table you have 2 rows.
        • The row related to the draft has creationdate and lastmoddate equal to null.
      3. Disable Collaborative Editing.
      4. Edit the same page, add new content to it and save it.
        • If you check records related to this page in the CONTENT table, you have 3 rows.
      5. Enable Collaborative Editing.
      6. Access the same page as before and click on Edit.
      Expected Results

      Confluence shows in the editor the contents of the last published page.

      Actual Results

      Confluence shows in the editor a blank page.

      Option 2

      1. Install a vanilla instance of Confluence.
      2. Disable Collaborative Editing.
      3. Create a page with a sample content.
        • If you check records related to this page in the CONTENT table, you have just one row.
      4. Enable Collaborative Editing.
      5. Access the page created a few steps before and click on Edit.
      6. Without changing anything on the contents, click on Close to exit the editor.
        • If you check records related to this page in the CONTENT table, now you have 2 rows.
        • The new row added to the table is related to the draft record and has creationdate and lastmoddate equal to null.
      7. Disable Collaborative Editing.
      8. Edit the same page again, add new content to it and save it.
        • If you check records related to this page in the CONTENT table, you have 3 rows.
      9. Enable Collaborative Editing.
      10. Access the same page as before and click on Edit.
      Expected Results

      Confluence shows in the editor the contents of the last published page.

      Actual Results

      Confluence shows in the editor an old version of the page, which is related to the draft record created when Collaborative Editing was first enabled.

      Notes

      This bug is related to CONFSERVER-57458 in a way that it shows the same characteristics to the end user.
      A bug new record was created because the trigger of is completely different.

      Workaround

      1. First, let's execute the following SQL query to identify how many affected pages are there with NULL creationdate and lastmoddate.
        SELECT count(1)
        FROM CONTENT d
        JOIN CONTENT c
          ON d.prevver = c.contentid
        WHERE d.content_status = 'draft'
          AND d.prevver IS NOT NULL
          AND (c.lastmoddate is not null and d.lastmoddate is null);
        
      1. Then, please navigate to the <Confluence-Base-URL>/admin/do-force-upgrade.action page.
      2. Next, set the drop-down to nullModificationDateDraftUpgradeTask and click on the Force Upgrade button.
      3. Lastly, please run the query that we ran on Step no. 1 again to check how many affected pages are left in the Confluence DB - we're expecting 0 result to be returned here.

      Attachments

        1. drafts_img001.png
          drafts_img001.png
          42 kB
        2. drafts_img002.png
          drafts_img002.png
          64 kB
        3. drafts_img003.png
          drafts_img003.png
          372 kB
        4. drafts_img004.png
          drafts_img004.png
          786 kB
        5. drafts_img005.png
          drafts_img005.png
          72 kB
        6. drafts_img006.png
          drafts_img006.png
          304 kB
        7. drafts_img007.png
          drafts_img007.png
          204 kB
        8. drafts_img008.png
          drafts_img008.png
          62 kB

        Issue Links

          Activity

            People

              dluong Duy Truong Luong
              tmasutti Thiago Masutti
              Votes:
              15 Vote for this issue
              Watchers:
              31 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: