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

Staging process fails when we delete a published DLFileEntry and create a new one that includes the file extension or we delete a DLFolder and create a DLFileEntry with same name

Details

    Description

      Steps to Reproduce

      1. Create site and activate local staging
      2. Create a document from a file example.txt and make sure you set title=example (without .txt) for that document
      3. Publish to live
      4. Delete file example at Staging environment
      5. Create again a new document from the same file example.txt but now during set title=example.txt (with .txt)
      6. Execute publish operation from Staging to Live
        1. Wrong behavior: publish operation fail with error "DuplicatedFileException"
        2. Expected behavior: publish operation is successful and example is replaced with example.txt at Live environment

      There is a similar error with DLFolder, if you delete a folder called example and create a file called example at same place, publish operation will fail.

      All these issues are caused by validations at DLFileEntryLocalServiceImpl.validateFile, we should use methods from DLFileEntryLocalServiceImpl to check duplicates instead having a copy of that code at Staging functions because futures changes at validateFile will break staging.

      Attachments

        Issue Links

          Activity

            People

              yvonne.han Yvonne Han
              jorge.diaz Jorge Diaz
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7 years, 30 weeks, 5 days ago

                Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE