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

Attachment File Not Found - in children pages when a page is moved to another space


      Updated description:

      This issue is corrected in version 3.0.1. If you're not ready to upgrade, there are patch instructions below.

      I have attached UpdateAttachmentsOnFilesystemOnPageMoveListener.class that does not produce the exception you have mentioned and moves the page even if it cannot find attachments. You can install it by putting this file under <CONFLUENCE>/WEB-INF/classes/com/atlassian/confluence/pages/persistence/dao directory (you will need to create those directories if they don't exist) and restarting confluence. After that you would be able to move pages that have the 'attachment' problem.

      Please test the patch on you development instance before applying it in production. You might also want to rollback the patch once you fixed all 'broken' attachments.

      Additionally, there's a JSP file that recovers missing attachments if they're stored on the file system.
      The class file attached to the ticket fixes the problem from reoccurring, but does not recover the moved files. Attached is a JSP file that can recover attachments that have been affected by this bug.

      To use it:

      1. Download the JSP file from the attachments.
      2. Place it in <confluence-installation>/confluence/admin
      3. Browse to <base-URL>/admin/find_and_recover_attachments-3.x.jsp

      The recovery is self-explanatory from there. You may wish to do this on a test system first.

      This only works on configurations where files are stored in the file system, not the database. Please respond to this bug report if you need that configuration to be included or if you find any problems with the JSP.

      Original description:
      Not able to move attachments in a pagetree in Confluence 3.0.0_01.

      Customer submitted description:

      To reproduce:

      • create 2 spaces 'test1' + 'test2'
      • create 2 pages 'page1' + 'page2' in space 'test1'. 'page2' is a child of 'page1'.
      • create a simple text attachment on each page
      • go to 'page1' and move it to 'space2'
      • open page2 (now also in space2) ... you will see a correct attachment list, but when you try to open an attachment, you will get a message "Attachment File Not Found".

      Some notes:

      • page1 keeps its attachment correctly
      • If page1 is moved back to space1, attachment content reappears on page2

      The attachments folders remain in the original folder in the file system but not re-archived following their new page and space hierarchy.

      This will be a big pain for customers with big pagetree structure as they will have to move the page one by one in order to keep their attachments intact.

            akazatchkov Anatoli
            rhartono Roy Hartono [Atlassian]
            0 Vote for this issue
            62 Start watching this issue