[MGNLDATA-130] Error while renaming sub-items. Created: 01/Aug/11  Updated: 27/Apr/12  Resolved: 17/Apr/12

Status: Closed
Project: Magnolia Data Module (closed)
Component/s: None
Affects Version/s: 1.6.3
Fix Version/s: 1.6.5, 1.7.2

Type: Bug Priority: Major
Reporter: Danilo Ghirardelli Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File rename.patch    
Issue Links:
dependency
is depended upon by MGNLDATA-131 Optionally use the name field only fo... Closed
relation
is related to MGNLDATA-127 Subtype dialog reload incorrectly aft... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty

 Description   

I'm not talking about MGNLDATA-30, this is about node instances and not types.
Steps to reproduce, also in the current Magnolia online demo:

  • Create a new type
  • Create a subtype of the previous type
  • Create a new node of the type in the appropriate menu, and a sub-item for that node
  • Try renaming the sub-item

There will be an exception logged and an alert for the error, but in the end the rename will be completed anyway. You can try this in the online demo, for instance opening the "Company" and trying to rename "Jack-Middleman" to something else.

Full stack trace:

2011-08-01 12:35:32,253 ERROR info.magnolia.module.admininterface.AdminTreeMVCHandler.rename(AdminTreeMVCHandler.java:650)   can't rename
info.magnolia.module.admininterface.InvalidDialogHandlerException: No dialog handler for [null] found
	at info.magnolia.module.admininterface.DialogHandlerManager.getDialogConfigNode(DialogHandlerManager.java:147)
	at info.magnolia.module.data.trees.GenericDataAdminTree.renameNode(GenericDataAdminTree.java:170)
	at info.magnolia.module.admininterface.AdminTreeMVCHandler.rename(AdminTreeMVCHandler.java:646)
	at info.magnolia.module.admininterface.AdminTreeMVCHandler.saveValue(AdminTreeMVCHandler.java:618)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at info.magnolia.cms.servlets.MVCServletHandlerImpl.execute(MVCServletHandlerImpl.java:118)
	at info.magnolia.cms.servlets.CommandBasedMVCServletHandler.execute(CommandBasedMVCServletHandler.java:83)
	at info.magnolia.cms.servlets.MVCServlet.doPost(MVCServlet.java:123)


 Comments   
Comment by Danilo Ghirardelli [ 12/Aug/11 ]

Attached patch for GenericDataAdminTree.
The real source of the problem is the fact that dialogName property is never defined (at least not automatically) for generated data trees, only the "name" property is set. The patch will use the name if no dialogName is defined, and checks if at least one of those is defined.
Another way could be to change the getter of dialogName or the init to fallback to the name if nothing is defined. Or the user can define manually every dialogName for every tree/type used, but it's not very user friendly.

Generated at Mon Feb 12 05:11:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.