Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15863

Reverting or deleting the current version breaks attachment links

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 10.11-rc-1, 10.8.3, 9.11.9
    • 10.8.1, 10.9, 10.10
    • Old Core
    • Windows 2016 / Linux
      MSSQL 2016 / HSQLDB
      Tomcat 9.0.12 / Jetty
      File based perm store (E:\XWikiFiles)
    • Unknown
    • N/A
    • N/A

    Description

      Reverting or deleting a page causes attached file links to break. The attachments are still listed but clicking on a link goes to a not found.

      Trying to delete the broken attachment link gives:

      Failed to delete attachment Monitoring (SCOM 2016 - 1801) Infrastructure Diagram.vsdx

      ObjectNotFoundException: No row with the given identifier exists: com.xpn.xwiki.doc.XWikiAttachmentContent#-783834581

      Looking at the attachments table the broken links have NULL for XDD_CONTENTSTORE and XDD_ARCHIVESTORE.

      The attachments still exist on the filesystem/perm storage in the attachments directory with metadata, and changing the NULL entries to file restores the links after restart. IE E:\XWikiFiles\storage\xwiki%4Dain%44&%49%53%49nfrastructure%49nfr %53erver_%50riv%43hecklists%54est%57eb%48ome~this\attachments

      Reproduction step:

      • Create a page
      • Upload an attachment
      • Edit the page
      • Rollback to last upload
      • Try to download attachment

      Expected result:
      The attachment succeeds to download

      Obtained result:
      Attachment is not found + stack trace (see attached)

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              reighnman Jared O.
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: