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

XMLWordPrintable

    • 2
    • Major
    • 1

      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

            Assignee:
            Engin Tekin
            Reporter:
            Dugald Morrow
            Votes:
            30 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated:
              Resolved: