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

Missing attachments causes Confluence page move to other space to fail

    XMLWordPrintable

Details

    Description

      This is the new hierarchy for attachments in the file system:

      As you can see there are 9 levels including the 'ver003' folder. I found that if you are missing level 8 and 9 in the file system, Confluence can still move the page without any complain. If you are missing level 7 (content id) then it will complain and throw you a stack trace, also failing the move operation:

      Cause
      
      com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFileSystemException: Failed to move the attachment data
      at com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFilesystemOnPageMoveListener.moveAttachments(UpdateAttachmentsOnFilesystemOnPageMoveListener.java:94)
      
      caused by: java.io.FileNotFoundException: Source 'C:\confluencedata_mysql\attachments\ver003\187\36\786437\118\221\721118' does not exist
      at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:1733)
      Stack Trace:[hide]
      
      com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFileSystemException: Failed to move the attachment data
      at com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFilesystemOnPageMoveListener.moveAttachments(UpdateAttachmentsOnFilesystemOnPageMoveListener.java:94)
      at com.atlassian.confluence.pages.persistence.dao.UpdateAttachmentsOnFilesystemOnPageMoveListener.handleEvent(UpdateAttachmentsOnFilesystemOnPageMoveListener.java:67)
      at com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202)
      

      In the above, 721118 is the contentid.

      The message is a bit rude and it can be improved perhaps by informing the users that the attachments are not there and/or Confluence should ask whether they want to proceed with the move operation or not.

      Attachments

        Issue Links

          Activity

            People

              richatkins Richard Atkins
              rhartono Roy Hartono [Atlassian]
              Votes:
              21 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified