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

Cannot link to attachments attached to a space

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 5.7
    • 4.2.2, 4.2.6, 4.2.8, 4.3, 4.3.2, 4.3.3, 5.0.3, 5.1, 5.1.3
    • None

    Description

      You cannot link to an attachment attached to a space (and if it has already been indexed). Attachments can be added to a space using WebDAV and/or by uploading a space logo.

      Steps to reproduce:

      1. Create a space (in this example I'll call it HyperSpace)
      2. Go to the newly created space, set a custom logo for it
      3. Navigate to Confluence Admin and rebuild your content index, to make sure the modifications get indexed
      4. Create a new page, start typing '[' then the space key, in this case HYP. The space logo attachment should show (it's name after the space key). Select the attachment and insert the link
        (Same issue will occur for attachments uploaded to space directory using WebDAV and then referenced in the editor)
      5. Try saving or previewing the page and you will face an error:

        The following error(s) occured: There was an error loading preview, please try again later.
        HTTP Status 412 - Precondition Failed

        Or in Confluence 5.1, you get the following error instead:

      The following error(s) occurred:

      Failure when converting editor format to storage format.

      In atlassian-confluence.log you will find exceptions like:

      An error occurred while unmarshalling a link in the editor with the title <SPACE TITLE>
      Error creating resource identifier for resource Attachment ...
      com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while transforming editor format to storage format (com.atlassian.confluence.content.render.xhtml.XhtmlException: An error occurred while unmarshalling a link in the editor with the title <SPACE KEY/NAME>

      Workaround

      Do not insert links referencing attachments attached to a space. You can check which attachments are attached to a space by going to Space Tools > Content Tools > Attachments and looking at the Attached To column

      Attachments

        1. logo.jpg
          logo.jpg
          42 kB
        2. Preview.png
          Preview.png
          6 kB
        3. Save.png
          Save.png
          18 kB
        4. Screen Shot 2013-08-09 at 10.04.46 AM.png
          Screen Shot 2013-08-09 at 10.04.46 AM.png
          43 kB
        5. space-logo.png
          space-logo.png
          21 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pkoczan Peter Koczan (Inactive)
              Votes:
              28 Vote for this issue
              Watchers:
              29 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: