Details
-
Bug
-
Resolution: Outdated
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
Maintenance 8
-
3
Description
When pushing master content changes for a page component in which more than one property have been modified, only one of them will be pushed. You will need to push for each property changed.
Steps to reproduce with demo author
- Create a live copy from travel
- Modify about page changing the jumbotron component title and text properties
- Press push master content
Result: In about page in the copied tree, only one of the two modified properties has been updated.
Cause of the error is in info.magnolia.liveCopy.actions.PropagateMasterContentChangesHelper.updateMasterProperties(Node, Node), where after modifying a property, the method returns true which makes the iteration finish and not processing the rest of properties:
if (referencedNode.hasProperty(masterProperty.getName())) { // If the property value changed Property referencedProperty = referencedNode.getProperty(masterProperty.getName()); if (!masterProperty.getValue().getString().equals(referencedProperty.getValue().getString())) { referencedProperty.setValue(masterProperty.getValue()); log.info("Updating a property for the page: {} property is: {} master content page is: {} New Value: {} Old value: {}", referencedProperty.getValue().getString(), referencedNode.getPath(), referencedProperty.getName(), masterNode.getPath(), masterProperty.getValue().getString()); return true; <<<<<<<<<<<<<<<<<<<<<<<<<<< } } else { // This property is new referencedNode.setProperty(masterProperty.getName(), masterProperty.getValue()); log.info("Setting a new property for the page: {} property is: {} master content page is: {}", referencedNode.getPath(), masterProperty.getName(), masterNode.getPath()); return true; <<<<<<<<<<<<<<<<<<<<<<<<<<<<< }
Checklists
Acceptance criteria