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

Broken Attachment Link in JIRA Activity Stream Gadget

    XMLWordPrintable

Details

    Description

      Summary

      Confluence attachment is rendered as a broken link when viewed in JIRA Activity Stream gadget from JIRA and Activity Stream gadget from Confluence.

      Environment

      • Confluence 6.1.0, 6.1.2
      • JIRA 7.3.3, 7.3.5

      Steps to Reproduce

      1. Set up application links between JIRA and Confluence
      2. Add attachment in an existing Confluence page
      3. See JIRA Activity Stream gadget from JIRA Dashboard

      Expected Results

      The attachment is rendered correctly

      Actual Results

      • The attachment is rendered as a broken link
      • Opening the attachment in a new tab will result in a System Error page with below error:
      Cause
      java.lang.NullPointerException
      at com.atlassian.confluence.servlet.download.AttachmentDownload.getStreamForDownload(AttachmentDownload.java:105)
      Stack Trace:[hide]
      java.lang.NullPointerException
      at com.atlassian.confluence.servlet.download.AttachmentDownload.getStreamForDownload(AttachmentDownload.java:105)
      at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload$StreamResultCallback.doInTransaction(ServeAfterTransactionDownload.java:110)
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
      at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.getStreamInTransaction(ServeAfterTransactionDownload.java:36)
      at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:42)

      Notes

      • JIRA Activity Stream gadget can render the attachment correctly when JIRA 7.3.3 is integrated with Confluence 5.10.5
      • The same URL is used for linking the attachment when integrated with Confluence 5.10.5 and 6.1.0, for example http://10.60.2.82:8090//download/attachments

      Workaround

      Open the attachment link in a new tab and remove one of the 2 forward slashes between the Base URL and download/attachments. E.g. from:

      to

      Attachments

        1. 123.jpg
          123.jpg
          31 kB
        2. 1234.JPG
          1234.JPG
          37 kB
        3. 12345.JPG
          12345.JPG
          52 kB
        4. 123456.JPG
          123456.JPG
          16 kB
        5. Screen Shot 2018-02-16 at 9.10.44 am.png
          Screen Shot 2018-02-16 at 9.10.44 am.png
          135 kB

        Issue Links

          Activity

            People

              dluong Duy Truong Luong
              znoorsazali Zul NS [Atlassian]
              Votes:
              82 Vote for this issue
              Watchers:
              92 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: