Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.1.2
-
-
Empty show more show less
-
Yes
-
Yes
-
AuthX 21, AuthX 22
-
5
Description
The task MigrateBlockToIntermediateParentTask doesn't preserve the order of nodes. Running the task can actually reorder the nodes to an incorrect state.
Reproduce
- Using a version of Magnolia with Content editor 1.x (for example 6.2.10) startup and do a fresh install.
- Export one of the stories from the demo --> stories.stories-demo.lost-and-found-in-swiss-alps-6.2.10.yaml
- Shut down and copy the repository from the 6.2.10 instance to a current release like 6.2.24.
- Startup and perform the upgrade.
- Login and use the groovy script provided in documentation to migrate the data.
- Export the same story as in step 2 and compare the order of the blocks --> stories.stories-demo.lost-and-found-in-swiss-alps-6.2.24.yaml
Expected
The blocks should be in the same order after the migration of data.
Actual
The blocks have been reordered as shown in the screenshots.
Notes
The problem is the task is not using NodeUtil#moveNodeAfter(). You have to iterate over the old list and keep track of the last node which was moved so that the nodes can be moved in the same order.
Workaround
You can fix the order as long as you have an older system to retrieve the order from.
Execute scripts.getPreviousStoryOrder.xml to get a JSON object from the old system which can be fed into scripts.repairStoryBlockOrder.xml
to be run on the new system. See comment below for more details.
Checklists
Attachments
Issue Links
- depends upon
-
MAGNOLIA-8638 Getting h2 error while upgrading 6.2.10 to latest version
-
- Closed
-
- to be documented by
-
CONTEDIT-488 DOC: Add version info for the migration issue with MigrateBlockToIntermediateParentTask
-
- Closed
-
1.
|
QA |
|
Completed | Thuy To |
2.
|
Port to master |
|
Completed | Unassigned |