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

Attachments with percentage width not working after server to cloud migration in legacy pages

XMLWordPrintable

      Issue Summary

      After migration from server to cloud, attachment are not showing on View mode.

      Steps to Reproduce

      1. On Confluence Server, create a page and add some images
      2. Edit the image to display by percentage
      3. Migrate the space from server to Cloud
      4. Try to view the page on Cloud

      Expected Results

      Attachment thumbnail is visible.

      Actual Results

      Attachment thumbnail shows as 'Broken image'

      Additional Notes

      • Verified attachments are working fine on Attachment list
      • Verified attachments are working on Edit mode, this only impacts the View mode
      • Noticed this only impacts the images order by width. Example:
        • Broken image:
          <p><ac:image ac:width="50%"><ri:attachment ri:filename="abc.gif" /></ac:image></p>
          
        • After manual delete/re-upload the attachment:
          <p><ac:image ac:height="250"><ri:attachment ri:filename="abc.gif" ri:version-at-save="1" /></ac:image></p>
          

      Workaround

      • Delete and re-upload attachments
      • SQL query (Postgres) to identify the affected page:
        WITH pages AS
        (
            SELECT contentid FROM content c
            join spaces s on s.spaceid=c.spaceid
            WHERE contenttype = 'PAGE' AND ((prevver is null AND content_status = 'current'))
        ), affected_pages AS
        (
            SELECT contentid,regexp_matches (body,'<ac:image ac:width="([0-9]+)%">','g') AS image_width
            FROM bodycontent 
            WHERE contentid IN ( SELECT contentid FROM pages)
            AND body like '%<ac:image ac:width%'
        )
        SELECT distinct contentid FROM affected_pages;
        

              7812e3f9fb71 Vinodh Nagarajan
              cteh Ting
              Votes:
              10 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: