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

AP.content.getContext() returns an empty object in dynamic content macro editors

    XMLWordPrintable

Details

    Description

      Issue Summary

      AP.content.getContext() returns an empty object in dynamic content macro editors.

      Steps to Reproduce

      1. Create an app with a dynamic content macro defining a custom editor.
      2. Open the editor and call AP.context.getContext(callback)

      Expected Results

      The callback is called with a context object similar to:

       

       

      confluence: {
        content: {
          id: "12345678"
          type: "page"
          version: "7"
        }
        macro: {
          hash: "58e722af-f259-41be-a8df-ddddddd"
          id: "58e722af-f259-41be-a8df-eeeeeeee"
        }
        space: {
          id: "1234567"
          key: "FOO"
        }
      }
      

       

      Actual Results

      The context object is empty (for an unlicensed app):

      {}

      Workaround

      This might be a reasonable workaround https://community.developer.atlassian.com/t/attaching-a-file-via-restapi-to-a-confluence-page-draft/46609/11

      Attachments

        Issue Links

          Activity

            People

              etekin@atlassian.com Engin Tekin
              dmorrow@atlassian.com Dugald Morrow
              Votes:
              30 Vote for this issue
              Watchers:
              32 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: