Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-82258

Copying and pasting content between Confluence pages works intermittently for images (adding as attachment VS reference link)

XMLWordPrintable

      Issue Summary

      This bug is relatively similar to CONFCLOUD-73727: Copying and pasting web images on a page (not attaching) makes links and text unclickable/unselectable. However, in this case, it's about Confluence to Confluence content.

      When manually copying and pasting content between two existing pages on the same Confluence site, if the selection includes images, most of the time the images are attached to the destination page, but on a few occasions only a "reference" is added (this bug).

      That can be observed when checking the Storage Format for the page, where an unexpected additional <ri:page ... /> param tag was added inside the <ri:attachment> param for the <ac:image> macro, with information about the source space and page for the given image.

      This is particularly problematic when copying content between pages from spaces with distinct permissions, as the page that received the content (pasted) may display "broken images" when the viewer does not have access to the other page from which the content was copied.

      Steps to Reproduce

      We are not 100% clear on the steps to reproduce, but the basis is:

      1. Edit a page that contains images attached to it and copy the content.
      2. Go to another page, edit it, and paste the content.
      3. Publish the page
      4. Check attachments

      In other cases, it can also happen when (on step 1) copying the content while viewing a page instead of editing it. It seems to vary depending on browser, OS, size and type of content copied, among others.

      Expected Results

      The page got all the images from its body added as attachments, and the image appears as follows in the page Storage Format:

      <ac:image ... ac:alt="{image-file}" ac:width="{width}">
          <ri:attachment ri:filename="{image-file}" ri:version-at-save="1" />
      </ac:image> 

      Actual Results

      No attachments are added to the page. Instead, the Storage Format of the page shows the images as follows:

      <ac:image ... ac:alt="{image-file}" ac:width="{width}">
          <ri:attachment ri:filename="{image-file}" ri:version-at-save="1">
              <ri:page ri:space-key="{ref-space-key}" ri:content-title="{ref-page-title}" ri:version-at-save="{version-at-save}" />
          </ri:attachment>
      </ac:image> 

      That "<ri:page ... />" tag was not supposed to be there if the image was properly attached to the current page, instead of referenced from another.

      Workaround

      For the moment, the only workaround is using the Copy page feature instead of manually copying the content for a page. Alternatively, you can copy smaller pieces of content instead of an entire page, always double-checking if the images were added as attachments to the "destination" page.

              Unassigned Unassigned
              6b51accb6b4d Rodrigo Bozza (Atlassian)
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: