Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-38897

Attachment macro does not work as expected when used in SDK for Confluence 5.8.x

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Low
    • None
    • 5.8.2, 5.8.4, 5.8.5, 5.8.6, 5.8.8, 5.8.9
    • None

    Description

      Summary

      When using the SDK to run Confluence, using the Attachments macro will cause unexpected behavior (error messages, blank pages, etc)

      Environment

      • Atlassian SDK

      Steps to Reproduce

      1. Install the Atlassian SDK
      2. run Confluence using
        1. atlas-run-standalone --product confluence --version 5.8.9
      3. Create a page with an attachments macro
        • This will render an empty list as expected
      4. Add an attachment to the page
      5. View the page

      Expected Results

      The page renders a list of attachments

      Actual Results

      The page does not render a list of attachments.

      Velocity template accessing deprecated method com.atlassian.confluence.pages.Attachment#getContentType - /templates/extra/attachments/attachments-table.vm[line 67, column 47]

      Notes

      According to the published documentation, it should be useing getMediaType rather than getContentType since Confluence 5.7

      Solution / Workaround

      Run with dev mode disabled:

      atlas-run-standalone --product confluence --version 5.8.9 -Datlassian.dev.mode=false

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbrannen@atlassian.com Branno
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: