Editing pages after disabling and reenabling collaborative editing may cause the most recent published version saved while CE was disabled to not display

XMLWordPrintable

    • 1
    • Severity 2 - Major
    • 39

      Problem

      • Published edits made to pages after disabling Collaborative Dditing are not displayed when Collaborative editing is reenabled in Confluence 9.2.3 and then listed in the page history if a prior stale shared draft for the page is published.

      Environment

      • Confluence 9.2.3.
      • Other versions untested.

      Steps to Reproduce

      1. With Collaborative Editing (CE) enabled, create a page and publish it.
      2. Next, create a draft without publishing. Within the context of CE enabled, this is considered to be a shared draft.
      3. Disable CE.
      4. Create one or more updates to the page and publish them.
      5. At this point, the following query should display the old stale shared draft since it's last modified date is older than the modification date of the most recent published version of the page:
        SELECT d.contentid, d.title, d.prevver, d.lastmoddate, c.lastmoddate
        FROM CONTENT d
        JOIN CONTENT c ON d.prevver = c.contentid
        WHERE d.content_status = 'draft'
          AND (c.lastmoddate >= d.lastmoddate
          OR (c.lastmoddate is not null and d.lastmoddate is null));
        

        Normally, as part of re-enabling CE, Confluence will delete any old stale drafts captured by the query above. However, there are isolated instances when the old stale draft can't be deleted since it's content ID is being inappropriately referenced by some other record in the CONTENT table. One possible explanation for this kind of scenario is a failed page move.
        To simulate this sort of scenario, perform the following steps:

      1. Note down the contentid value of the stale shared draft.
      2. Locate another unrelated page within the CONTENT table.
      3. Set the value of this record's prevver column to the contentid of the stale shared draft to trigger a ConstraintViolationException for constraint fkoxtt893weujkyh0iicoxsm37v.  For example:
        update content set prevver = <stale draft content id> where contentid = <unrelated published page content id>;
        
      1. Next re-enable CE.
      2. Locate and open the page. Note that the old stale shared draft content is displayed instead of the last version of the page published while CE was disabled.
      3. If the stale shared draft content is published, this will create a new version of the page and the prior published version will then be found in the page history.

      Actual Results

      After re-enabling CE, the following occurs:

      1. Within the application-confluence log, a ConstraintViolationException is recorded right after the Synchrony startup.
      2. Within the admin UI, the Change editing mode window that's used to enable and disable CE constantly displays a circular waiting gif and never stops spinning.
      3. Meanwhile, the CE admin screen in the background displayed that CE was ON.
      4. Upon reloading this admin page, the Change editing mode window disappears and the main CE admin page displayed CE as ON, lending the impression that everything is fine with CE.

      Expected Results

      Collaborative Editing should not enable so that Confluence doesn't display the old stale shared draft version of the page which will not include any changes to the page that had been subsequently published while CE was off.

      Actual Results

      The enabling window for Collaborative Editing will spin and will persist for an indeterminate amount of time, or until the page is refreshed or times out.


      • Also, notice that Confluence reports Collaborative Editing is enabled on the background page.

      • Collaborative Editing will be enabled at this point. However, the user may notice server errors when attempting to edit pages. As well, changes made to pages while collaborative editing was disabled will be discarded the next time they are edited and saved.

      Workaround

      Notes

      An error similar to the one below will be recorded in the Confluence's application logs after re-enabling Collaborative Editing:

      • "ERROR: update or delete on table "content" violates foreign key constraint "fkoxtt893weujkyh0iicoxsm37v" on table "content" DETAIL: Key (contentid)=(80785795) is still referenced from table "content". SQL state: 23503" 
      • ERROR [Long running task: EnableTask] [plugins.synchrony.tasks.AbstractConfigLongRunningTask] runInternal An error occurred when running a Synchrony ConfigLongRunningTask
         -- url: /confluence/rest/synchrony-interop/disable | userName: admin | referer: https://<confluenceurl>/confluence/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 5104eff1c061c91c
        java.lang.RuntimeException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
        ...
        Caused by: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
        ...
        Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
        

        1. Screenshot 2025-06-13 at 3.05.58 PM.png
          167 kB
          Anthony Suchodolski
        2. Screenshot 2025-06-13 at 3.06.52 PM.png
          232 kB
          Anthony Suchodolski

            Assignee:
            Akshay Rai
            Reporter:
            Anthony Suchodolski (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: