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

Confluence remigrates Wiki Markup content on restart if a plugin is updated

      Issue Summary

      The recent fix in Confluence 5.7.4 ( CONF-35004 ) means that on each restart following a plugin update/upgrade/install, Confluence attempts to re-migrate all our "unmigrated" pages (1,800 pages and their attachments) because we have some unknown macros in those pages. These pages seem to get re-migrated again if we update any plugin, enable/re-enable plugins followed by a restart.

      This is polluting the change history of the pages because it adds another version on each page. It also appears that the attachments on those pages are getting re-indexed.

      I understand the fix may have been intentional but it's having some bad side-effects.

      Also related:

      Steps to Reproduce

      • Set up a Confluence instance with the new affected versions.
      • Create a new page with Unmigrated-wiki-markup macro as shown below or monitor an existing page with it.
        • Create a new page and in a Confluence editor > add `Markup`
        • Choose `Confluence wiki` and insert the below content; notice there are some whitespaces in the front of the closing curly bracket.You can see the Preview render a `Wiki Markup` macro  
          {
             " "
            } 

        • Click the `Insert` button and save the page. This will add an unmigrated-wiki-markup macro is added to the page.
      • Install/upgrade a third-party app that provides macros. Such as the Content Formatting for Confluence plugin version 7.2.4.
      • Restart the instance.

      Expected Results

      No unexpected messages displayed in the UI or application logs and no new, unnecessary versions created.

      Actual Results

      See notes below.

      Notes on re-opening the bug

      When this issue occurs, one or two symptoms will be present:

      1. First, Confluence will display a Migration of unmigrated content due to installation of a new plugin message for an affected page within the All updates landing page.  
        1. In 8.5.x the Publisher and Published date for the new page version created will be retained as per documentation.
        2. Starting 9.x the Publisher and Published date will not be retained and will appear with Anonymous user and new date when Confluence was restarted.
      2. Second, the following message appears in the application logs after plugin install/upgrade followed by a restart.
        2025-03-27 10:59:07,358 INFO [macro-migration:thread-1] [render.xhtml.migration.ErrorReportingV2Renderer] render Unable to render content on page BIN:My Test\nWrapping content in unmigrated wiki markup macro due to system error: index -1, length 0
        

      Workaround

      A workaround has been added to the description of related ticket CONF-32837, which provides a method via SQL to disable the remigration job on restarts. As with all database manipulation tasks, please be sure to test this on a non-Production environment first.

      In the release of 5.10.8, a system variable is added to turn off the remigration behavior during startup. To use this feature:

      1. Open CONF_INSTALL_FOLDER/bin/setenv.sh (setenv.bat or service under Windows)
      2. Locate "CATALINA_OPTS" and add the below line to the file:
        CATALINA_OPTS="-Dconfluence.startup.remigration.disable=true ${CATALINA_OPTS}"
      3. Save the file and restart Tomcat.

      This workaround has been verified to work for Confluence 9.x and would need to be present in the setenv file prior to the first restart of Confluence after an upgrade.

        1. 9.2.2-new-version-created.png
          284 kB
          Ojas Potdar
        2. image-2025-03-27-12-51-37-279.png
          29 kB
          Steve Shaw
        3. insertmarkup.png
          127 kB
          Ojas Potdar
        4. issuereprod8516.png
          117 kB
          Ojas Potdar
        5. umigratedwikimarkup.png
          200 kB
          Ojas Potdar
        6. wikimarkup.png
          21 kB
          Ojas Potdar

            [CONFSERVER-37710] Confluence remigrates Wiki Markup content on restart if a plugin is updated

            Jael Busuttil added a comment -

            9.2.3 Affected Also.

            Jael Busuttil added a comment - 9.2.3 Affected Also.

            Jordan Anslow added a comment -

            Note

            If you're experiencing this on newer versions of Confluence, please refer to this ticket: CONFSERVER-99596

             

            Jordan Anslow added a comment - Note If you're experiencing this on newer versions of Confluence, please refer to this ticket: CONFSERVER-99596  
            Jordan Anslow made changes -
            Link New: This issue has a regression in CONFSERVER-99596 [ CONFSERVER-99596 ]
            Jordan Anslow made changes -
            Description Original: h3. Issue Summary

            The recent fix in Confluence 5.7.4 ( -CONF-35004- ) means that on each restart following a plugin update/upgrade/install, Confluence attempts to re-migrate all our "unmigrated" pages (1,800 pages and their attachments) because we have some unknown macros in those pages. These pages seem to get re-migrated again if we update any plugin, enable/re-enable plugins followed by a restart.

            This is polluting the change history of the pages because it adds another version on each page. It also appears that the attachments on those pages are getting re-indexed.

            I understand the fix may have been intentional but it's having some bad side-effects.

            Also related:
             * CONF-35185
             * CONF-32837
             * -CONF-32318-

            h3. Steps to Reproduce
             * Set up a Confluence instance with the new affected versions.
             * Create a new page with *Unmigrated-wiki-markup* macro as shown below or monitor an existing page with it.
             ** Create a new page and in a Confluence editor > add `{*}Markup{*}`
             ** Choose `{*}Confluence wiki{*}` and insert the below content; notice there are *some whitespaces* in the front of the closing curly bracket.You can see the Preview render a `{*}Wiki Markup{*}` macro  
            {code:java}
            {
               " "
              } {code}
            !insertmarkup.png|thumbnail!

             ** Click the `{*}Insert{*}` button and save the page. This will add an *unmigrated-wiki-markup* macro is added to the page. !umigratedwikimarkup.png|thumbnail!
             * Install/upgrade a third-party app that provides macros. Such as the Content Formatting for Confluence plugin version 7.2.4.
             * Restart the instance.

            h3. Expected Results

            No unexpected messages displayed in the UI or application logs and no new, unnecessary versions created.
            h3. Actual Results

            See notes below.
            h3. Notes on re-opening the bug

            When this issue occurs, one or two symptoms will be present:
             # First, Confluence will display a _Migration of unmigrated content due to installation of a new plugin_ message for an affected page within the *All updates* landing page.   !image-2025-03-27-12-51-37-279.png!
             ## In 8.5.x the *Publisher* and *Published date* for the new page version created will be retained as per documentation. !issuereprod8516.png|width=428,height=185!
             ## Starting *9.x* the *Publisher* and *Published* date will not be retained and will appear with *Anonymous* user and new date when Confluence was restarted. !9.2.2-new-version-created.png|width=543,height=311!
             # Second, the following message appears in the application logs after plugin install/upgrade followed by a restart.
            {code:java}
            2025-03-27 10:59:07,358 INFO [macro-migration:thread-1] [render.xhtml.migration.ErrorReportingV2Renderer] render Unable to render content on page BIN:My Test\nWrapping content in unmigrated wiki markup macro due to system error: index -1, length 0
            {code}

            h3. Workaround

            A workaround has been added to the description of related ticket CONF-32837, which provides a method via SQL to disable the remigration job on restarts. As with all database manipulation tasks, please be sure to test this on a non-Production environment first.

            In the release of 5.10.8, a system variable is added to turn off the remigration behavior during startup. To use this feature:
             # Open CONF_INSTALL_FOLDER/bin/setenv.sh (setenv.bat or service under Windows)
             # Locate "CATALINA_OPTS" and add the below line to the file:
            CATALINA_OPTS="-Dconfluence.startup.remigration.disable=true ${CATALINA_OPTS}"
             # Save the file and restart Tomcat.

            (i) This workaround has been verified to work for Confluence 9.x and would need to be present in the setenv file prior to the first restart of Confluence after an upgrade.
            New: h3. Issue Summary

            The recent fix in Confluence 5.7.4 ( -CONF-35004- ) means that on each restart following a plugin update/upgrade/install, Confluence attempts to re-migrate all our "unmigrated" pages (1,800 pages and their attachments) because we have some unknown macros in those pages. These pages seem to get re-migrated again if we update any plugin, enable/re-enable plugins followed by a restart.

            This is polluting the change history of the pages because it adds another version on each page. It also appears that the attachments on those pages are getting re-indexed.

            I understand the fix may have been intentional but it's having some bad side-effects.

            Also related:
             * CONF-35185
             * CONF-32837
             * -CONF-32318-

            h3. Steps to Reproduce
             * Set up a Confluence instance with the new affected versions.
             * Create a new page with *Unmigrated-wiki-markup* macro as shown below or monitor an existing page with it.
             ** Create a new page and in a Confluence editor > add `{*}Markup{*}`
             ** Choose `{*}Confluence wiki{*}` and insert the below content; notice there are *some whitespaces* in the front of the closing curly bracket.You can see the Preview render a `{*}Wiki Markup{*}` macro  
            {code:java}
            {
               " "
              } {code}
            !insertmarkup.png|thumbnail!

             *
             ** Click the `{*}Insert{*}` button and save the page. This will add an *unmigrated-wiki-markup* macro is added to the page. !umigratedwikimarkup.png|thumbnail!
             * Install/upgrade a third-party app that provides macros. Such as the Content Formatting for Confluence plugin version 7.2.4.
             * Restart the instance.

            h3. Expected Results

            No unexpected messages displayed in the UI or application logs and no new, unnecessary versions created.
            h3. Actual Results

            See notes below.
            h3. Notes on re-opening the bug

            When this issue occurs, one or two symptoms will be present:
             # First, Confluence will display a _Migration of unmigrated content due to installation of a new plugin_ message for an affected page within the *All updates* landing page.   !image-2025-03-27-12-51-37-279.png!
             ## In 8.5.x the *Publisher* and *Published date* for the new page version created will be retained as per documentation. !issuereprod8516.png|width=428,height=185!
             ## Starting *9.x* the *Publisher* and *Published* date will not be retained and will appear with *Anonymous* user and new date when Confluence was restarted. !9.2.2-new-version-created.png|width=543,height=311!
             # Second, the following message appears in the application logs after plugin install/upgrade followed by a restart.
            {code:java}
            2025-03-27 10:59:07,358 INFO [macro-migration:thread-1] [render.xhtml.migration.ErrorReportingV2Renderer] render Unable to render content on page BIN:My Test\nWrapping content in unmigrated wiki markup macro due to system error: index -1, length 0
            {code}

            h3. Workaround

            A workaround has been added to the description of related ticket CONF-32837, which provides a method via SQL to disable the remigration job on restarts. As with all database manipulation tasks, please be sure to test this on a non-Production environment first.

            In the release of 5.10.8, a system variable is added to turn off the remigration behavior during startup. To use this feature:
             # Open CONF_INSTALL_FOLDER/bin/setenv.sh (setenv.bat or service under Windows)
             # Locate "CATALINA_OPTS" and add the below line to the file:
            CATALINA_OPTS="-Dconfluence.startup.remigration.disable=true ${CATALINA_OPTS}"
             # Save the file and restart Tomcat.

            (i) This workaround has been verified to work for Confluence 9.x and would need to be present in the setenv file prior to the first restart of Confluence after an upgrade.
            Jordan Anslow made changes -
            QA Demo Status New: Not Needed [ 14332 ]
            QA Kickoff Status New: Not Needed [ 14236 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Needs Triage [ 10030 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            Support reference count Original: 58 New: 59
            SET Analytics Bot made changes -
            UIS Original: 60 New: 70
            SET Analytics Bot made changes -
            UIS Original: 54 New: 60
            SET Analytics Bot made changes -
            Support reference count Original: 57 New: 58
            SET Analytics Bot made changes -
            UIS Original: 42 New: 54

              Unassigned Unassigned
              a38518e05741 David Yu
              Affected customers:
              10 This affects my team
              Watchers:
              35 Start watching this issue

                Created:
                Updated:
                Resolved: