-
Bug
-
Resolution: Obsolete
-
Neutral
-
None
-
1.4.5
If a page template has the property named name and a variant of this page is created when the audience of the variant is selected. The variant node name is updated to the name defined in property name. It is done in info.magnolia.ui.dialog.action.SaveDialogAction
/** * Set the node Name. * Node name is set to: <br> * the value of the property 'name' if it is present. */ protected void setNodeName(Node node, JcrNodeAdapter item) throws RepositoryException { String propertyName = "name"; if (node.hasProperty(propertyName) && !node.hasProperty(ModelConstants.JCR_NAME)) { Property property = node.getProperty(propertyName); String newNodeName = property.getString(); if (!node.getName().equals(Path.getValidatedLabel(newNodeName))) { newNodeName = Path.getUniqueLabel(node.getSession(), node.getParent().getPath(), Path.getValidatedLabel(newNodeName)); item.setNodeName(newNodeName); NodeUtil.renameNode(node, newNodeName); } } }
This issue makes the variant node has the same name as the parent node, instead of the expected "variant-x". This issue is causing issues with variants logic, for example, if you try to Preview the variant as visitor, an infinite loop is executed.
You can find more information in linked support ticket. In this case the loop was caused by cmsfn.siteRoot(content)
- is related to
-
MURLTRANS-2 Module doesn't work for page variants
- Closed
-
MURLTRANS-13 Provide a groovy script to migrate translations away from "name"
- Closed
-
MURLTRANS-3 Make property name and query node type configurable
- Closed