[PUBLISHING-77] Publishing with versioning fails if subnodes have the same name. Created: 27/Feb/20  Updated: 29/Mar/22  Resolved: 08/May/20

Status: Closed
Project: Publishing
Component/s: None
Affects Version/s: 1.1.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Marc Johnen Assignee: Mercedes Iruela
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 19.10, Tomcat 9


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Team: Nucleus

 Description   

Publishing with versioning fails if subnodes have the same name.
For exmaple when publishing

 

node /home[2]/footer/0/footerProducts,
node /home[2]/footer/0/links,
node /home[2]/navigation/06/navigationLinks,
node /home[2]/navigation/0/item,
node /home[2]/navigation/05/navigationLinks,
node /home[2]/navigation/07/navigationLinks,
node /home[2]/navigation/01/loggedInLinks]

 

info.magnolia.cms.core.version.CopyUtil.importNode(Node, Node) 
... 
tempPath = RandomStringUtils.randomAlphabetic(16); 
Node tempNode = parent.addNode(tempPath); 
for (Node child : children) { 
   NodeUtil.moveNode(child, tempNode); 
} 
...

All nodes will be moved to tempNode (not including the path) so when moving the second "navigationLinks" it fails because there is already one existing.

 

 

ERROR info.magnolia.module.scheduler.CommandJob 26.02.2020 15:27:40 – Cannot execute command {0}{1}.ERROR info.magnolia.module.scheduler.CommandJob 26.02.2020 15:27:40 – Cannot execute command {0}{1}.javax.jcr.ItemExistsException: The move operation was not completed due to an item with the same name already present. at info.magnolia.jcr.wrapper.MagnoliaSessionWrapper.move(MagnoliaSessionWrapper.java:63) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.jcr.util.NodeUtil.moveNode(NodeUtil.java:523) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.CopyUtil.importNode(CopyUtil.java:374) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.CopyUtil.doImport(CopyUtil.java:152) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.CopyUtil.copyToVersion(CopyUtil.java:135) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.BaseVersionManager.createVersion(BaseVersionManager.java:265) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.BaseVersionManager.access$000(BaseVersionManager.java:91) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.BaseVersionManager$1.exec(BaseVersionManager.java:214) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.BaseVersionManager$1.exec(BaseVersionManager.java:209) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.security.JCRSessionOp.exec(JCRSessionOp.java:68) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:378) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:356) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.cms.core.version.BaseVersionManager.addVersion(BaseVersionManager.java:209) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.impl.VersionCommand.versionRecursively(VersionCommand.java:135) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.impl.VersionCommand.versionRecursively(VersionCommand.java:154) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.impl.VersionCommand.versionRecursively(VersionCommand.java:154) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.impl.VersionCommand.execute(VersionCommand.java:91) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:80) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:69) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.chain.ChainBase.execute(ChainBase.java:101) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.commands.DelegateCommand.execute(DelegateCommand.java:66) ~[magnolia-core-6.1.4.jar:?] at info.magnolia.module.scheduler.CommandJob.execute(CommandJob.java:110) [magnolia-module-scheduler-2.3.2.jar:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.1.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.1.jar:?] 

 



 Comments   
Comment by Mercedes Iruela [ 05/Mar/20 ]

Hi Marc,

I am testing this issue but I failed in my attempt to reproduce it. Could you please attach to the ticket an export of the content that you are trying to publish? Thanks.

Mercedes

Comment by Mercedes Iruela [ 08/May/20 ]

Closed as cannot reproduce it.

Generated at Mon Feb 12 10:35:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.