-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.1.10 DXP FP13, 7.1.X, 7.2.10 DXP FP1, 7.2.X, 7.2.1 CE GA2, 7.3.10 DXP GA1, Master
-
Component/s: Staging, ~[Archived] WCM
-
Branch Version/s:7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Fix Priority:4
-
Git Pull Request:
Steps to reproduce
1) Switch on local staging
2) Add a Basic Document, its title should be: "example (“PDF”).pdf" (use the special double quotes in the file name)
3) Add a journal structure with Documents and Media field and add a template for it
4) Create a journal article with this structure and select the uploaded document
5) Publish to Live
Actual result: Check both articles' content in the database and see that staging couldn't replace the groupid
Expected result: GroupId is replaced to point to the live group
Example URLS:
groupId not replaced when special char is in the file name:
http://localhost:8080/documents/38110/0/example+%28%E2%80%9CPDF%E2%80%9D%29.pdf/441e9d9b-2c14-ff5a-0fa8-1ef445a686be?t=1560260068090
http://localhost:8080/documents/38110/0/example+%28%E2%80%9CPDF%E2%80%9D%29.pdf/441e9d9b-2c14-ff5a-0fa8-1ef445a686be?t=1560260068090
groupId replaced when there are no special chars:
http://localhost:8080/documents/38110/0/example_normal.pdf/e47f3016-0721-66cd-5861-39a400f82fa1?t=1560260696457
http://localhost:8080/documents/38105/0/example_normal.pdf/e47f3016-0721-66cd-5861-39a400f82fa1?t=1560260696457
Reason:
https://github.com/liferay/liferay-portal-ee/blob/7.1.x/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/internal/exportimport/content/processor/JournalArticleExportImportContentProcessor.java#L162
Here it tries to find and replace the content: "example (\u201cPDF\u201d).pdf
However it couldn't find it as the content contains: "example (“PDF”).pdf"
Therefore it won't replace it.
Reproduced also on 7.1.x and Master.