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

Attachments on a page are broken after moving page trees between spaces

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      Attachments of child pages are missing if parent page was moved cross-space. Affects 5.8.16 and 5.8.17. Upgrade to 5.8.18 if you are experiencing this issue and resolve the currently affected attachments using these instructions.

      Please do not confuse with https://jira.atlassian.com/browse/CONF-36497 when attachments are missing in case if move failed.

      Steps to reproduce:

      • Create empty page (this is the parent page)
      • Create empty child page of the parent page
      • Attach a file to child page. Click on file and see download prompt.
      • Move the parent page to another space
      • Navigate to child page, and attempt to download the attachment

      Expected Results

      Attachments are moved

      Actual Results

      "Attachment File Not Found"

      2015-11-18 11:36:00.092389500 2015-11-18 11:36:00,087 WARN [http-bio-1990-exec-83] [atlassian.confluence.pages.DefaultAttachmentManager] getAttachmentData Could not find data for attachment: Attachment: Version17LaunchDRAFT.pptx v.1 (1769495) username - com.atlassian.confluence.pages.persistence.dao.filesystem.AttachmentDataFileSystemException: No such file for Attachment: Version17LaunchDRAFT.pptx v.1 (1769495) username. Were looking at /data/jirastudio/confluence/home/attachments/ver003/203/69/819203/233/19/1769483/1769495/1
      

      Server workaround

      Cloud Workaround

      1. Download the plugin here
      2. Place the .jar in /data/jirastudio/confluence/service/psd/
      3. If psd folder doesn't exists mkdir /data/jirastudio/confluence/service/psd
      4. Change permissions:
        chmod a+rwx /data/jirastudio/confluence/service/psd/confluence-attachment-recovery-1.2-SNAPSHOT.jar
        
      5. nano /data/icebat/local.yaml
        confluence::psd:
            confluence.confluence-attachment-recovery:
                target: "/data/jirastudio/confluence/service/psd/confluence-attachment-recovery-1.2-SNAPSHOT.jar"
        
      6. Run /sw/ondemand/install/icebatstrap/install/install-studio.sh -s (no downtime is required)
      7. Add ALL to logging com.atlassian.confluence.support and com.atlassian.confluence.support.upgradetask at https://<hosted URL>/wiki/admin/viewlog4j.action
      8. Go to Missing Attachment Recovery page - https://<hosted URL>/wiki/admin/plugins/attachmentrecovery/run-attachments-recovery-task.action

      Dev Info.

            [CONFSERVER-39975] Attachments on a page are broken after moving page trees between spaces

            This is still an issue now.

            SchwarzM90 added a comment - This is still an issue now.

            Alex Fox added a comment -

            Still an issue, cannot copy any pages via the API as all attachments get turned into "Unknown Attachment" despite being present on the page. I have noticed that this seems to mainly affect pages that have been copied using the Copy Hierarchy tool beforehand. If I delete and reattach an image to a page, then copy it with the API, this issue does not seem to occur.

            Alex Fox added a comment - Still an issue, cannot copy any pages via the API as all attachments get turned into "Unknown Attachment" despite being present on the page. I have noticed that this seems to mainly affect pages that have been copied using the Copy Hierarchy tool beforehand. If I delete and reattach an image to a page, then copy it with the API, this issue does not seem to occur.

            Please reopen this issue since it's still unfixed.

            We spent days on fixing pages where attachments got lost during page moves.

            It's actually sad to see that such critical bug does not gain a proper attention.

            Jens Kasperek added a comment - Please reopen this issue since it's still unfixed. We spent days on fixing pages where attachments got lost during page moves. It's actually sad to see that such critical bug does not gain a proper attention.

            Minh Tran added a comment -

            Dear tim.j.thompson,

            I believe this is something that our support team will be able to help you with.
            Could I ask that you create a support ticket on https://support.atlassian.com?
            Once you've done this one of our support engineers will be in touch to work with you in resolving this problem.

            Regards,
            Minh Tran
            Confluence Bugmaster
            Atlassian

            Minh Tran added a comment - Dear  tim.j.thompson , I believe this is something that our support team will be able to help you with. Could I ask that you create a support ticket on https://support.atlassian.com ? Once you've done this one of our support engineers will be in touch to work with you in resolving this problem. Regards, Minh Tran Confluence Bugmaster Atlassian

            Using confluence (server) but do not have system access (enterprise controlled). Is there anyway from a user perspective to recover the attachments?

            Tim Thompson added a comment - Using confluence (server) but do not have system access (enterprise controlled). Is there anyway from a user perspective to recover the attachments?

            Our sys ops folks supposedly created a ticket. I told them to summon you on it as well when they add the logs.

            Ryan Anderson added a comment - Our sys ops folks supposedly created a ticket. I told them to summon you on it as well when they add the logs.

            jens.kasperek1 it should be fixed in 5.9.2/5.8.18.

            Per Ryan's feedback it present in 5.9.8 however it might be some different variation of this bug.

            I'm yet to hear back and see more data on it.

            Petro Semeniuk (Inactive) added a comment - jens.kasperek1 it should be fixed in 5.9.2/5.8.18. Per Ryan's feedback it present in 5.9.8 however it might be some different variation of this bug. I'm yet to hear back and see more data on it.

            So, does this mean that the error occurs again in Confluence 5.9.8?

            Is it fixed on version 5.9.10?

            Jens Kasperek added a comment - So, does this mean that the error occurs again in Confluence 5.9.8? Is it fixed on version 5.9.10?

            randerson496209801 actually I just recalled that dnorton@atlassian.com wrote python script which will recover attachments after cross space move.

            You can find more info on https://confluence.atlassian.com/confkb/how-to-resolve-missing-attachments-in-confluence-201761.html. It's tested in real world on instances with thousand spaces. It's best to use it for recovery

            Petro Semeniuk (Inactive) added a comment - randerson496209801 actually I just recalled that dnorton@atlassian.com wrote python script which will recover attachments after cross space move. You can find more info on https://confluence.atlassian.com/confkb/how-to-resolve-missing-attachments-in-confluence-201761.html . It's tested in real world on instances with thousand spaces. It's best to use it for recovery

            By "reverse" do you mean performing a second cross-space move back to the original location?

            Am reaching out to internal staff to see if I can get the logs.

            Ryan Anderson added a comment - By "reverse" do you mean performing a second cross-space move back to the original location? Am reaching out to internal staff to see if I can get the logs.

              psemeniuk Petro Semeniuk (Inactive)
              psilveira Paula Silveira
              Affected customers:
              6 This affects my team
              Watchers:
              55 Start watching this issue

                Created:
                Updated:
                Resolved: