[ 
http://jira.magnolia-cms.com/browse/MGNLDATA-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Milan Divilek updated MGNLDATA-125:
-----------------------------------

    Assignee:     (was: Philipp Bärfuss)

> Missing adminInterface menu under certain condition.
> ----------------------------------------------------
>
>                 Key: MGNLDATA-125
>                 URL: http://jira.magnolia-cms.com/browse/MGNLDATA-125
>             Project: Magnolia Data Module
>          Issue Type: Bug
>    Affects Versions: 1.6.3, 1.7.2
>            Reporter: Danilo Ghirardelli
>            Priority: Major
>             Fix For: 1.6.x, 1.7.3
>
>         Attachments: RootTypes.patch
>
>
> There is a problem that prevents to generate the data menu correctly in some 
> cases, but I haven't yet found a way to always reproduce it, because it 
> depends deeply on the order in which types are registered, which is not 
> guaranteed.
> On my system, these steps will often lead to the problem, but not always:
> - create a new type named "z" (without quotes), with a base foder of "/z"
> - create a new subtype for "z", named "a" (without quotes), with the same 
> base folder.
> - export the trees, type nodes and the dialogues for these new types. Do not 
> export adminInterface/config/menu, because it is expected to be recreated if 
> missing.
> - you may logout/login to check that the adminInterface menu was created 
> correctly.
> - restart the webapp.
> You would expect that the adminInterface menu is created again correctly, but 
> often it isn't.
> The problem lays in the DataModule class, lines 186-191:
> {code}
>                 if(!allRootPaths.contains(type.getRootPath())) {
>                     allRootPaths.add(type.getRootPath());
>                     // create rootPath and a menu entry for each if necessary
>                     createRootPath(type);
>                     updateDataMenu(type);
>                 }
> {code}
> If you check the code you'll see that "types" are considered all at the same 
> level, because they are stored in a map. If for any reason a subtype is 
> returned by the map before its parent, these lines will add the root path to 
> the list, but the "updateDataMenu" will skip the menu creation because it is 
> a subtype. When the type is returned by the map, the root path is already in 
> the list and it's skipped, so the menu is not created.
> It's subtle but quite annoying, because there is no way to know which menu 
> will be missing on various installations. Maybe it would be nice to either 
> sort the map having types first, or add the rootPath to the list only if it's 
> not a subtype.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
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