-
Bug
-
Resolution: Fixed
-
High
-
6.0, 6.1.0, 6.2.0, 6.5.0, 6.4.1, 6.6.0, 6.7.0
-
39
-
Severity 2 - Major
-
292
-
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
- Set up an instance with no context path, eg http://localhost:8090/
- Create a page and add some images, attachments and user mentions to it
- Confirm it displays ok
- Shut down Confluence and set a context path, eg http://localhost:8090/confluence
- Restart and update the base URL in Confluence Admin > General Configurations
- view the page
- Observe that the images are still ok
- Edit the page
- Observe that the images are broken in edit mode
- 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 --. It is unclear if this applies to the image issue as well.CONFSERVER-52455
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.
- Go to > General Configuration > Collaborative editing
- Click Change mode
- Select Off
- Click Change
- Then turn Synchrony back on
- Then rebuild the index via the UI
- The issue will stop occurring but you will need to go back and manually restore any pages that were affected
- You can restore the page to an older version
- 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.
- Go to > General Configuration > Collaborative editing
- Click Change mode
- Select Off
- Click Change
- Then rebuild the index via the UI
- The issue will stop occurring but you will need to go back and manually restore any pages that were affected
- You can restore the page to an older version
- 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:
- Edit the affected page that has either User Mention or Attachment Link in it
- Save the page without making any changes (this would break the page due to this bug)
- 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.
- causes
-
CONFSERVER-51998 Attachment links are changed to a self referential link of the page once you edit the page
- Closed
- is duplicated by
-
CONFSERVER-52455 Editing a page after changing the base URL causes all page links and @mentions to become links to the page itself
- Closed
- is related to
-
CONFSERVER-55267 Links to internal pages and attachments are changed to a self-referential link after changing the context path or protocol (http/https) in the base URL
- Closed
-
CONFSERVER-45095 Deleting an attachment, page, or plugin outside the editor does not update the editor format
- Long Term Backlog
- was split into
-
CONFSERVER-55249 Fix images and view attachment macros in drafts and pages that got corrupted after changing the BaseURL
- Long Term Backlog
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- relates to
-
PSR-102 Loading...