Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
Support
-
Flagged
-
US PS General
Description
Plugin: http://channel-pagesup.forge.onehippo.org/
The DocumentCopyingPageCopyEventListener doesn't work well when the target channel has a different content structure than the source channel.
1) Although creation of translated documents does work, there are empty folders created with the same node structure as the source.
2) The HST component parameters are not correct: they should point to the newly created translated documents.
Reproduction
Build and run the demo (10.1.1 + overrides) and plugin version 1.1.0.
In the Channel Mgr:
- Open the channel "Demo Dutch - Netherlands" for editing
- Open the channel "Demo English - United States" for editing
- Go to "Pages" and select root-simple-content
- Go to "Page Settings", select the Dutch channel and make a copy of the page.
Results:
1) In the content, empty folders "banners" and "content" are created below the existing "banners-nl" and "content-nl"
2) In the page configuration at 'hst:hst/hst:configurations/channelpagesupdemo-nl-nl-preview/hst:workspace/hst:pages/root-simplecontent/main/container', the document parameters of both banner and simplecontent are faulty, pointing to "content" and not to "content-nl"
Code analysis
1) In DocumentCopyingPageCopyEventListener#copyDocuments the targetDocumentAbsPath is not correctly determined: it should not add source document path to target content base root but it should take a linked folder of the source folder into account
2) There is no code that sets "document" parameters on the target page node which seems available through PageCopyContext#getNewPageNode