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

Navigating between pages with "Page include" macros and images cause the images to fail to load

XMLWordPrintable

      Issue Summary

      Sometimes, when navigating between pages that use the "Page include" macro to include content with images, images will fail to load.

      Steps to Reproduce

      1. Create a page titled "Page A".  Add an image to Page A and publish it.
      2. Create a page titled "Page B". Add an image to Page B and publish it.
      3. Create a page titled "Page C".  Add an "Include Page" macro to Page C, including the content of Page B.
      4. Navigate to Page A.
      5. Open the Chrome DevTools to do an "Empty Cache and Hard Reload".  (Right click on the "Reload" symbol in Chrome and click "Empty Cache and Hard Reload".)
      6. Wait for Page A to load.
      7. Navigate to Page C via clicking in the PageTree or via the "Recents" menu.  You must directly navigate from Page A to Page C without doing a full reload.

      Note: These steps are not the only sequence of actions that can cause this bug.  I've also seen this happen when:

      • Navigating from a page with a "Page include" macro that includes images to a page with images and no macros.
      • Navigating from a page with no images to a page with a "Page include" macro that includes images.

      Expected Results

      Page C should load correctly.  The included images from Page B should be visible.

      Actual Results

      Page C will load, but the included images from Page B will fail to load.  An error message like "Preview unavailable" will display.

      In the "Network" tab of the DevTools, you'll see that the request to https://api.media.atlassian.com/items fails with a 403 Forbidden error.  The response will look something like this:

      {
          "error": {
              "code": "JwtAuthoriser:AuthorisationError",
              "title": "The token does not allow requested operation. \"urn:filestore:collection:contentId-454330319026\" needs \"read\" permission",
              "href": "https://api.media.atlassian.com#UnauthorizedError"
          }
      } 

      Workaround

      After navigating to Page C, reload the page.  The images will then load correctly.

              7bbe227b9eb5 Yingya Zhang
              16e48f83bd48 Nicholas Reichert
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: