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

Restoring a page to a previous version creates historic entries in CONTENT_LABEL

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      This bug can cause undesired results in Confluence, such as the page properties report macro showing multiple versions of the same page in a single report.

      Steps to Reproduce

      1. Create a page with the label "test"
      2. Edit the page created in step 1, and save (this creates version 2 of that page)
      3. Restore the page to version 1 (which now creates version 3 which is reverted from v1)

      Notice that after the steps above, you will now obtain both version 2 and version 3 of the page, linked to the "test" label in the CONTENT_LABEL table:

      SELECT * FROM CONTENT c JOIN CONTENT_LABEL cl ON c.CONTENTID = cl.CONTENTID JOIN LABEL l on cl.LABELID = l.LABELID WHERE l.NAME = 'test';
      

      If the steps above are reproduced this way:

      1. Create a page with the page properties macro inserted (with label="test")
      2. Edit the page created in step 1, and save (this creates version 2 of that page)
      3. Restore the page to version 1 (which now creates version 3 which is reverted from v1)
      4. Create a page with the page properties report macro inserted, set to find pages with label="test"

      You will realize that the page properties report macro in the page created in Step 4 will list down both version 2 and version 3 of the same page in that macro.

      Workaround

      1. Take a backup of the database
      2. Run this query to remove these entries from CONTENT_LABEL:
        DELETE FROM CONTENT_LABEL WHERE CONTENTID IN  (SELECT CONTENTID FROM CONTENT WHERE PREVVER IS NOT NULL);
        
      3. Flush all the caches via Confluence Admin >> Cache Statistics

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fsim Foo Sim (Inactive)
              Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: