Affects Version/s: 6.2.X EE, 7.0.0 M5
Steps to Reproduce
- Create site and activate local staging
- Create a document from a file example.txt and make sure you set title=example (without .txt) for that document
- Publish to live
- Delete file example at Staging environment
- Create again a new document from the same file example.txt but now during set title=example.txt (with .txt)
- Execute publish operation from Staging to Live
- : publish operation fail with error "DuplicatedFileException"
- : 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.