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

Including a page with macro, results in an inconsistent macro.id and 404

    XMLWordPrintable

Details

    Description

      Summary

      When including a page (into another page via a third party app) that has a dynamic macro in it, you get a different macro.id as a context parameter in the descriptor. The macro.id is defined in the descriptor as:

      "url": "/macros/ui-textbox?&pageId={page.id}&pageVersion={page.version}&macroId={macro.id}&truncated={macro.truncated}&macroBody={macro.body}&size={size}&type={type}"
      

      The expectation would be, macro.id is persisted and consistent when including them in another page, but you get an error:

      Uncaught (in promise) {
      "statusCode":404,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"No macro found on content id : ContentId{id=137494529} with version: 1 and macroId: 371049b0-d5c3-42dd-a7f3-2bd8411d6dcd"}
      

      Replication Steps

      • Install RefinedSpaces.
      • Add/Edit a page
        • Add an Excerpt macro.
        • Add a UI Text Box macro inside the Excerpt macro.
        • Add enough of content inside the Text Box macro so that it will be truncated when delivered to RefinedSpaces server (I used two info macros).
        • Publish.
      • Add second page
        • Add an Excerpt Include macro with the page where you previously added the Excerpt.
        • Publish.

      Expected result: The UI Text Box is shown on the page.
      Actual result: An eternal spinner is shown.

      This sounds like an error in RefinedSpaces but for some reason the macro id for the UI Text Box is not the same on the original page as in the Excerpt Include page. When RefinedSpaces tries to query the Confluence REST API

      GET /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}

      it returns a 404 since the macro id is invalid.

      For more information, please see linked supporting ticket

      Attachments

        Issue Links

          Activity

            People

              105094f35dd0 Nitish Midha
              e0c321422756 Julia Nilsson
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: