Change By: Milan Divilek (21/Aug/13 1:31 PM)
Description: Steps to reproduce:
- Lets have this structure of autogeneratedComponents
{noformat}
- autoGeneration
-- conent
--- first component
--- second component
--- third component
{noformat}
- Then visit the page where autogenerated components are located and remove the first component.
- Previously removed component is automatically created and is ordered as last.
- Remove second component
 again  then the component is not automatically created again.

Similarly when you add new component into autogenerated components in template definitions - then if you place this component on first place then this component is generated during first visit of page, but when you add this component on different place then the component is not automatically generated.

The problematic code is info.magnolia.rendering.generator.CopyGenerator.createNode(Node, Map<String, Object>)
{code}
if(parentNode != null && parentNode.hasNode(name)) {
    log.debug("path {} was already found in repository. No need to create it.", parentNode.getPath() + "/" + name);
     break;
}
{code}

it checks if the component node exists if yes then it "break" for loop so no other components are processed.

If we change break to continue then all component will be process, but this break the functionality of remove component from the page. Different question is if we want allow removing autogenerated components?
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to