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

Exception is thrown when you import a LAR with a new DLFileEntry/DLFolder with a name that collides with other DLFolder/DLFileEntry

    Details

      Description

      At LAR import, we are checking duplicated DLFileEntry names or duplicated DLFolder names but we are not checking that a DLFileEntry can have a duplicated name with a DLFolder (or viceversa DLFolder can have a duplicated name with a DLFileEntry)

      Steps to reproduce with DLFileEntry

      1. Create a new site
      2. Create a document into Document Library, called "Test"
      3. Export site to a LAR file
      4. Delete document "Test" and empty the recycle bin
      5. Create a folder into Document Library, called "Test"
      6. Import LAR file to site with document "Test"
        • Wrong behavior: During document import, "Test" document cannot imported as a folder with name "Test" already exists and a duplicate exception is thrown. LAR is not imported
        • Expected behavior: During document import, due of name collision with existing folder "Test", new document "Test" is renamed into "Test 1". LAR is successfully imported

      Steps to reproduce with DLFolder

      1. Create a new site
      2. Create a folder into Document Library, called "Test"
      3. Export site to a LAR file
      4. Delete folder "Test" and empty the recycle bin
      5. Create a document into Document Library, called "Test"
      6. Import LAR file to site with folder "Test"
        • Wrong behavior: During document import, "Test" folder cannot imported as a document with name "Test" already exists and a duplicate exception is thrown. LAR is not imported
        • Expected behavior: During document import, due of name collision with existing document "Test", new folder "Test" is renamed into "Test (2)". LAR is successfully imported

      Steps to reproduce with DLFileEntry that has same name but without extension (see LPS-58634)

      1. Create a new site
      2. Import a JPG file into Document Library, and call it image.jpg (with extension)
      3. Export site to a LAR file
      4. Delete file image.jpg
      5. Import same JPG file into Document Library, and call it image (without extension)
      6. Import LAR file to site with document with old name image.jpg (with extension)
        • Wrong behavior: During document import, image.jpg cannot be imported due name collision with image (more info at LPS-47852) and a duplicate exception is thrown. LAR is not imported
        • Expected behavior: During document import, due of name collision with existing image, image.jpg is renamed into image 1.jpg. LAR is successfully imported
      7. Repeat previous steps but changing names: creating first image file and before importing LAR, create image.jpg file.

        Attachments

        1. fixed_1.png
          fixed_1.png
          32 kB
        2. fixed_2.png
          fixed_2.png
          34 kB
        3. fixed_3.png
          fixed_3.png
          59 kB
        4. fixed_4.png
          fixed_4.png
          59 kB
        5. fixed.png
          fixed.png
          24 kB
        6. reproduced.png
          reproduced.png
          42 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 37 weeks ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 Alpha 2