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
- Create a page
- Upload an attachment
- Edit the page
- Rollback to last upload
- Try to download attachment
The attachment succeeds to download
Attachment is not found + stack trace (see attached)