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

Adding attachments macro to a template returns error

XMLWordPrintable

      Issue Summary

      Upon adding the attachments macro to a global or space template, it returns an error "

      Error rendering macro 'attachments' : Cannot invoke "com.atlassian.confluence.core.ContentEntityObject.getld)" because "contentEntityObject" is null".

      However, it is possible to save the template and use it to create a new page based on this template.

      The attachment macro will be added as expected in the page created based on that template, without the error.

      Steps to Reproduce

      1. Go to Confluence Settings > Global Templates and blueprints
      2. Click on the button Add global page template
      3. Add a title to the template page and the attachments macro
      4. Save the Template
      5. Create a new page
      6. Search for the Template just created that contains the attachments macro
      7. Publish page

      Expected Results

      The attachments macro in the template creation does not return an error, it displays the macro as expected

      Actual Results

      "Error rendering macro 'attachments' : Cannot invoke "com.atlassian.confluence.core.ContentEntityObject.getld)" because "contentEntityObject" is null" is displayed in the template edit mode upon creation, instead of displaying the attachment's macro expected UI.

      Workaround

      Save the template, even though the error is there. It should work normally when creating a new page based on the template.

              Unassigned Unassigned
              jhonda@atlassian.com Jessica
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: