Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-61337

PortalException in moveFolders method will cause inconsistency issue between database and file system



      When we try to move folders from one repository to another one, if the source file is deleted in file system, the move process would be roll back due to transaction, while files before exception would be moved to new repository. This causes inconsistency.

      Steps to reproduce:
      1/ Install a clean Liferay 6.2 EE SP13 bundle, install fix LPE-14555 (LPS-60884)(This is essential, you can find the fix in patch portal).
      2/ Start portal.
      3/ Create new site named "Site A" and create new public page "Home" on "Site A".
      4/ Navigate to Site Administration > Content > Documents and Media
      5/ Change display mode for D&M portlet to "list view"
      6/ Create the following folder structure in a D&M
      Folder 1
      – A
      – B
      7/ Use "Add > Multiple Documents" to upload one file, file1.
      8/ Use "Add > Multiple Documents" to upload two files, file2, file3.
      9/ Go to tomcat data folder, find the location of file3. Delete the file3.
      10/ Create new site named "Site B" and create a new public page "Home" on "Site B"
      11/ Deploy the attached plugin "cqu-folder-move-portlet-"
      12/ Add custom CQU portlet "Move Folder" to page "Home" for site "Site A".
      13/ Move folder "Folder 1" from site "Site A" to site "Site B" using custom CQU "Move Folder" portlet
      13.1/ In target group ID, select site "Site B"
      13.2/ In the from folder id, enter the folderid for the "Folder 1" folder.
      Note: Click Folder 1 and copy the last URL parameter (i.e. folderid=FOLDER_ID)
      13.3/ Enter to-folder-id = 0
      Test Results:

      Actual result: Custom CQU "Move Folder" portlet displays an error message.
      "Folder 1" still exists in Site "A".
      Sub folder "A" and its documents are still in Site "A". file1 is in the folder.
      Sub folder "B" and its documents are still in Site "A". file2, file3 are in the folder.
      Site "B" contains no contents in the D&M portlet.
      Try to download file1, file2. They are becoming "not found".

      Expected result: Custom CQU "Move Folder" portlet moves folder "Folder 1" from site "Site A" to site "Site B", and they can be downloaded. The file3 is still in site A.




            melody.wu Melody Wu
            bejond.shao Bejond Shao (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            0 Vote for this issue
            0 Start watching this issue


              7 years, 7 weeks ago


                Version Package
                7.0.0 Beta 1