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

Pages using attachments from other pages are having their storage format broken after the attachment's page is deleted

    XMLWordPrintable

Details

    Description

      Summary

      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&amp;version=2"/>
      

      Restoring the "Page A" won't change the storage format back to the original form.

      Steps to Reproduce

      1. Create page 'A' and attach an image.
      2. Create a page 'B' and use the "Search on other pages" option from the "Insert files and images" menu.
      3. Select the image that was uploaded to page 'A'.
      4. Delete the page 'A'.
      5. Restore page 'A'.

      Expected Results

      Page 'B' will display the image from page A as the page was deleted and restored from Trash.

      Actual Results

      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"
      

      to

      ri:url ri:value="http://localhost:8090/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&amp;version=2"
      

      Notes

      Workaround

      • Manually upload the attachment to the page in case the storage format is changed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gviana Guilherme V. (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: