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

Images, attachments, user mentions are broken after changing the BaseURL

      Atlassian Update - March 2018

      The fix for this issue released in 6.8.0 will prevent links to images (and view attachment macros) from being corrupted after a change in the Confluence baseURL.

      However, if there are any existing link corruptions that occurred prior to upgrading to 6.8.0, those corruptions will remain, and the only way to fix is to either revert to a published version of a page without such corruptions, or discard the draft (if the corruption is only in the draft).

      I have created an issue to track a fix on the already corrupted links: CONFSERVER-55249

      Steps to Reproduce 

      1. Set up an instance with no context path, eg http://localhost:8090/
      2. Create a page and add some images, attachments and user mentions to it
        • Confirm it displays ok
      3. Shut down Confluence and set a context path, eg http://localhost:8090/confluence
      4. Restart and update the base URL in Confluence Admin > General Configurations
      5. view the page
        • Observe that the images are still ok
      6. Edit the page
        • Observe that the images are broken in edit mode
      7. Type some text and save
        • Observe that the images are still broken

      This is likely happening because Synchrony "saved" the links with the old BaseURL, and then when the BaseURL changed, those changes aren't propagated into Synchrony (because it's saving the editor format).

      Workaround

      Turn Collaborative Editing Off and back On (recommended)

      It has been confirmed that turning Synchrony Off and On again resolves the related issue with links in -CONFSERVER-52455-. It is unclear if this applies to the image issue as well.

        All existing shared drafts are lost when you switch collaborative editing off, so make sure your users have published any work they want to keep before you make the change.

      1. Go to > General Configuration > Collaborative editing
      2. Click Change mode
      3. Select Off
      4. Click Change
      5. Then turn Synchrony back on
      6. Then rebuild the index via the UI
      7. The issue will stop occurring but you will need to go back and manually restore any pages that were affected
        1. You can restore the page to an older version
        2. Or you can manually adjust the links
      Note about this workaround

      When Collaborative Editing is enabled, and a page is being edited, all those small changes are stored in Synchrony in-memory cache/events table on the database. That includes the base URL.
      When the base URL got changed in Confluence, Synchrony won't be aware of this change. When turning off Collaborative Editing, you discard all the data that Synchrony had and when enabling again, you are forcing to fetch a new copy of the base URL from Confluence. That's how turning it off and on again helps workaround this issue

      Turn Collaborative Editing Off Entirely (not recommended)

        All existing shared drafts are lost when you switch collaborative editing off, so make sure your users have published any work they want to keep before you make the change.

      1. Go to > General Configuration > Collaborative editing
      2. Click Change mode
      3. Select Off
      4. Click Change
      5. Then rebuild the index via the UI
      6. The issue will stop occurring but you will need to go back and manually restore any pages that were affected
        1. You can restore the page to an older version
        2. Or you can manually adjust the links

      More information can be found in Administering Collaborative editing.

      If turning off Collaborative Editing is not an option or the affected area is not too big for the instance, there is a workaround that can be applied to a page to fix it on a page to page
      basis:

      1. Edit the affected page that has either User Mention or Attachment Link in it
      2. Save the page without making any changes (this would break the page due to this bug)
      3. Revert the page back to the history of 1 version before the current broken version (the version that has all the user mentions and attachment links still intact)

      Now that the page has been affected once, any edits after this will not cause the user mentions or attachment links to change again.

            [CONFSERVER-52060] Images, attachments, user mentions are broken after changing the BaseURL

            Quan Pham added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 6.10.3
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            If you're running the Confluence 6.6 Enterprise release, a fix for this issue is now available in Confluence 6.6.14, which you can find in the Download Archives.

            If you're running the Confluence 6.13 Enterprise release, a fix for this issue is now available in Confluence 6.13.5, which you can find in the Download Archives.

            Quan Pham added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 6.10.3 Upgrade now or check out the Release Notes to see what other issues are resolved. If you're running the Confluence 6.6 Enterprise release, a fix for this issue is now available in Confluence 6.6.14, which you can find in the Download Archives . If you're running the Confluence 6.13 Enterprise release, a fix for this issue is now available in Confluence 6.13.5, which you can find in the Download Archives .

            If you're running the Confluence 6.6 Enterprise release, a fix for this issue is now available in Confluence 6.6.11, which you can find in the Download Archives.

            Zhenhuan Zhou (Inactive) added a comment - If you're running the Confluence 6.6 Enterprise release, a fix for this issue is now available in Confluence 6.6.11, which you can find in the Download Archives .

            One other observation I have noticed about the resolution about turning collaborative editing on and off is that that it has side affects on other functionality.

            Pages with action items that have been completed are now marked as incomplete. You have to use the page history functionality to get the action items from a previous versions.

             

            Avinash Singh added a comment - One other observation I have noticed about the resolution about turning collaborative editing on and off is that that it has side affects on other functionality. Pages with action items that have been completed are now marked as incomplete. You have to use the page history functionality to get the action items from a previous versions.  

            On 25-July-2018 we upgraded from Confluence 6.2.2 to Confluence 6.10.0
            Last week (week of 13-Aug-2018) some of our users begin to complain this issue. We were able to reproduce it by finding an older page in the wiki, editing, previewing, and then updating. The links became self-referential. I'm bringing this up because the issue is marked fixed in versions earlier than our current 6.10.0 ... yet we are still having this issue. As noted, we did change the BaseURL during this upgrade as we switched to a behind-a-proxy setup.

            Stephen Jarjoura added a comment - On 25-July-2018 we upgraded from Confluence 6.2.2 to Confluence 6.10.0 Last week (week of 13-Aug-2018) some of our users begin to complain this issue. We were able to reproduce it by finding an older page in the wiki, editing, previewing, and then updating. The links became self-referential. I'm bringing this up because the issue is marked fixed in versions earlier than our current 6.10.0 ... yet we are still having this issue. As noted, we did change the BaseURL during this upgrade as we switched to a behind-a-proxy setup.

            There is another work around for this without restoring a previous version.

            Before publishing your changes use the preview option. This will surface the issues.  Thereafter select edit and then select cancel.

            This will discard the draft. This should fix the page going forward.

            Avinash Singh added a comment - There is another work around for this without restoring a previous version. Before publishing your changes use the preview option. This will surface the issues.  Thereafter select edit and then select cancel. This will discard the draft. This should fix the page going forward.

            We were running 6.8.1 when we changed the base URL during a server migration and this bug seems to be still alive and well. For us it did affect some links and mentions. Stopping and starting Collaborative Editing seems to have helped with the links but not with the mentions, as I am still seeing cases where the mentions get replaced by a link to the "current" page.

            Atlassian, would you mind re-opening this issue? Or has it been taken over by CONFSERVER-55267?

            Daniel Varela Santoalla added a comment - We were running 6.8.1 when we changed the base URL during a server migration and this bug seems to be still alive and well. For us it did affect some links and mentions. Stopping and starting Collaborative Editing seems to have helped with the links but not with the mentions, as I am still seeing cases where the mentions get replaced by a link to the "current" page. Atlassian, would you mind re-opening this issue? Or has it been taken over by CONFSERVER-55267 ?

            Are there any plans to release this fix for Confluence 6.6.x - the 'Enterprise' release?

            This is a bug fix and the information page states that bug fixes will be provided for 6.6 until EOL.

            If this isn't released for Confluence 6.6, then many affected enterprises will have to wait years to re-enable collaborative editing.

            Ian Clelland added a comment - Are there any plans to release this fix for Confluence 6.6.x - the 'Enterprise' release? This is a bug fix and the information page states that bug fixes will be provided for 6.6 until EOL. If this isn't released for Confluence 6.6, then many affected enterprises will have to wait years to re-enable collaborative editing.

            Sattesh M added a comment - - edited

            Looks like this bug is back in 6.9.1
            https://jira.atlassian.com/browse/CONFSERVER-56006

            Edit:
            Seems like the above is a duplicate of
            https://jira.atlassian.com/browse/CONFSERVER-55267

            This here, CONFSERVER-52060, is for broken images, user mentions, and attachment macros.
            The CONFSERVER-55267 is for internal page links and attachment links.

            Sattesh M added a comment - - edited Looks like this bug is back in 6.9.1 https://jira.atlassian.com/browse/CONFSERVER-56006 Edit: Seems like the above is a duplicate of https://jira.atlassian.com/browse/CONFSERVER-55267 This here, CONFSERVER-52060 , is for broken images, user mentions, and attachment macros. The CONFSERVER-55267 is for internal page links and attachment links.

            Minh -If I'm at 6.7.0, what would be the reason to upgrade only to 6.7.3 when 6.8.0 is already released?

            Thanks.

            Stephen Kairys added a comment - Minh -If I'm at 6.7.0, what would be the reason to upgrade only to 6.7.3 when 6.8.0 is already released? Thanks.

            Minh Tran added a comment -

            A fix for this issue is available to Server and Data Center customers in Confluence 6.7.3
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Minh Tran added a comment - A fix for this issue is available to Server and Data Center customers in Confluence 6.7.3 Upgrade now or check out the Release Notes to see what other issues are resolved.

              jxie Chii (Inactive)
              dunterwurzacher Denise Unterwurzacher [Atlassian] (Inactive)
              Affected customers:
              27 This affects my team
              Watchers:
              53 Start watching this issue

                Created:
                Updated:
                Resolved: