Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-51998

Attachment links are changed to a self referential link of the page once you edit the page

    XMLWordPrintable

Details

    Description

      Summary

      When you edit a page that contains attachments that are displayed as a link, those links will point to the page itself and the name of the link will also change to the name of the page.

      Steps to replicate

      1. Create a new page called 'Test'.
      2. Use the Confluence Source Editor add-on to insert this storage format into the page:
        <p>
          <ac:structured-macro ac:macro-id="fa94f7f6-7974-42a4-a8b7-752c0f3e27a8" ac:name="toc" ac:schema-version="1"/>
        </p>
        <h3>Documentation</h3>
        <p>
          <ac:link>
            <ri:attachment ri:filename="File 1.docx"/>
          </ac:link>
        </p>
        <h3>Schedule</h3>
        <p>
          <ac:link>
            <ri:attachment ri:filename="File 2.xlsx"/>
          </ac:link>
        </p>
        <h3>Attachments</h3>
        <table class="wrapped">
          <colgroup> <col/> <col/> </colgroup>
          <tbody>
            <tr>
              <th> </th>
              <th> </th>
            </tr>
            <tr>
              <td>Questions</td>
              <td>
                <div class="content-wrapper">
                  <p>
                    <ac:link>
                      <ri:attachment ri:filename="File 3.xlsx"/>
                    </ac:link>
                  </p>
                  <p>
                    <ac:link>
                      <ri:attachment ri:filename="File 4.docx"/>
                    </ac:link>
                  </p>
                </div>
              </td>
            </tr>
            <tr>
              <td>Answers</td>
              <td>
                <div class="content-wrapper">
                  <p>
                    <ac:link>
                      <ri:attachment ri:filename="File 5.xlsx"/>
                    </ac:link>
                  </p>
                </div>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="auto-cursor-target">
          <br/>
        </p>
      3. Save the page.
      4. Confirm that the links are named as File 1 to File 5.
      5. Edit the page.
      6. Click on 'Preview' or save the page.

      Expected results

      The link names should remain as File 1, File 2, File 3, etc.

      Actual results

      The link names are all changed to the page title, 'Test'.

      Note

      Looking at the storage format, the edit results in this link:

      <ac:link><ri:attachment ri:filename="File 5.xlsx" /></ac:link>

      To change to this:

      <ac:link />

      We've also seen it change to reference the page ID in stead of the attachment, like this:

      <ac:link><ri:content-entity ri:content-id=“PAGE ID" /></ac:link>
      

      Resolution

      Confluence 6.6.3 (LTS) and Confluence 6.7.2 and above have a fix for this issue. Upgrading Confluence is the recommended resolution. However, the fix only prevents new occurrences of page corruption from occurring and does not fix pages that have already been corrupted by the bug. Existing pages will still have to be fixed manually.

      Attachments

        1. ConfluenceIssue.PNG
          ConfluenceIssue.PNG
          7 kB
        2. dsf.txt
          9 kB
        3. editpage.png
          editpage.png
          410 kB
        4. SF_With_Links_CE_Off_6.6.txt
          9 kB
        5. SF_Without_Links_6.5.2.txt
          6 kB
        6. SF_After_Edit_Update_CE_On_6.6.txt
          8 kB
        7. SF_With_Links_CE_Off_6.5.2.txt
          8 kB

        Issue Links

          Activity

            People

              jxie Chii
              azolkefli Athirah Zolkefli
              Votes:
              55 Vote for this issue
              Watchers:
              104 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: