[MGNLMIGRATION-269] Migration fails with 'invalid name' JCR error when moving 'templates' to 'templates/pages' Created: 17/Oct/13  Updated: 16/Sep/15  Resolved: 01/Nov/13

Status: Closed
Project: Migration 4.4 to 4.5 (closed)
Component/s: Migration Task
Affects Version/s: 1.2.6
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Charles Jones Assignee: Robert Šiška
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

NodeUtil.renameNode() was rewritten in this commit and no longer works if a path is passed as the newName parameter. The MoveMigrationTask calls MigrationUtil.renameAndMergeNodes(pagesNode, "templates/pages", false, true);, which passes 'templates/pages' to NodeUtil.renameNode(), resulting in the following:

2013-10-15 16:08:24,715 ERROR info.magnolia.module.InstallContextImpl : > Unable to move Templates and Paragraphs for the following module:gato
javax.jcr.RepositoryException: invalid name: templates/pages
at org.apache.jackrabbit.core.NodeImpl.orderBefore(NodeImpl.java:1815)
at info.magnolia.jcr.wrapper.DelegateNodeWrapper.orderBefore(DelegateNodeWrapper.java:332)
at info.magnolia.jcr.wrapper.DelegateNodeWrapper.orderBefore(DelegateNodeWrapper.java:332)
at info.magnolia.jcr.util.NodeUtil.renameNode(NodeUtil.java:523)
at info.magnolia.templatingkit.migration.util.MigrationUtil.renameAndMergeNodes(MigrationUtil.java:197)
at info.magnolia.templatingkit.migration.util.MigrationUtil.renameAndMergeNodes(MigrationUtil.java:208)
at info.magnolia.migration.task.general.MoveMigrationTask.executeTask(MoveMigrationTask.java:99)



 Comments   
Comment by Robert Šiška [ 01/Nov/13 ]

This seems to be an outdated problem fixed in MGNLMIGRATION-249 (598498), which was fixed in 1.2.5.
The stack trace indicates, that version used wasn't 1.2.6, as it's stated in Affected Version/s field.

Comment by Michael Mühlebach [ 16/Sep/15 ]

This ticket was closed because former resolved tickets are deemed to be closed now. If this assumption is untrue in this particular case please feel free to reopen the ticket again.

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