Cloud-to-Cloud Confluence migration leaves view-file macros with stale ri:content-entity IDs causing “We couldn't load the file” despite attachments present

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      After a successful Confluence Cloud-to-Cloud migration (100% completion, all attachments present), pages using the view-file macro reference attachments via stale ri:content-entity IDs from the source site. This causes embedded files to fail to load, even though the attachments exist in the destination Cloud site.

      Steps to Reproduce

      • Perform a Cloud-to-Cloud migration of a Confluence space containing pages with embedded Office files using the view-file macro.
      • After migration, open a migrated page with the macro.

      Expected Results

      • The macro should reference attachments by filename only, or the ri:content-entity should be remapped to the new destination attachment ID.
      • Embedded files should display correctly.

      Actual Results

      Migration logs: 100% success, all media files copied.

      Storage format on affected pages:

      <ri:attachment ri:filename="<YOUR-FILE>"><ri:content-entity ri:content-id="<ID>" ri:version-at-save="1" /></ri:attachment>
      

      Storage format on working/test page:

      <ri:attachment ri:filename="<YOUR-FILE>"/>
      

      Workaround 1

      Simple re‑upload using space attachments (easier, no API)

      1. If the files are already fully migrated and available in the space:
      2. Go to Space settings → Content → Attachments in the space on https://<your-site>.atlassian.net.
      3. There you can:
      4. Find and download the affected attachments.
      5. Go back to the original page, re‑upload the same file, and insert it again using the current “view file” macro.
      6. When you re‑insert the file this way, Confluence will create a fresh macro using the correct, modern format (filename‑based, no stale ID), and the file should load normally.
      7. This is often the quickest option if you want to fix specific high‑value pages without using the API.

      Workaround 2

      API‑based, for bulk/automated updates

      1. If you have many pages to update and prefer an automated approach:
      2. Your development or admin team can use the Confluence Cloud REST API to:
      3. Read the page body,
      4. Remove the ri:content-entity lines from view-file macros so they match the working example above,
      5. And write the updated body back.
      6. The endpoint for updating a page is documented here: The Confluence Cloud REST API

              Assignee:
              Unassigned
              Reporter:
              Arthur Dantas
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: