Severity 2 - Major
Confluence is changing the storage format of the page when an image is deleted from another page. This only happens when you attach an image from another page. At first, Confluence is using the following storage format:
<ac:image><ri:attachment ri:filename="image.PNG"><ri:page ri:content-title="Page A" ri:space-key="AAA" /></ri:attachment></ac:image>
This means that one page("Page B") is getting the "image.png" from "Page A" that is located in the "AAA" space.
If the "Page A" is deleted and restored the storage format will change to something like:
<ac:image ac:title="image.PNG"> <ri:url ri:value="http://localhost:8090/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&version=2"/>
Restoring the "Page A" won't change the storage format back to the original form.
Steps to Reproduce
- Create page 'A' and attach an image.
- Create a page 'B' and use the "Search on other pages" option from the "Insert files and images" menu.
- Select the image that was uploaded to page 'A'.
- Delete the page 'A'.
- Restore page 'A'.
Page 'B' will display the image from page A as the page was deleted and restored from Trash.
Page 'B' will show "unknown attachment" as the storage format is no longer pointing to page 'A'. The storage format will change from
ri:page ri:content-title="Page A" ri:space-key="AAA"
- Manually upload the attachment to the page in case the storage format is changed.
- is related to
CONFSERVER-51998 Attachment links are changed to a self referential link of the page once you edit the page