[MGNLCDEP-11] Allow direct deletion of nodes from the JCR website browser Created: 14/Jan/11  Updated: 18/Jan/11  Resolved: 14/Jan/11

Status: Closed
Project: Content Dependencies
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: 1.0.2

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia EE 4.4.1


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

An issue was reported today on the user-list by Simone Miterangelis (Tinext). He tried to delete a node data from the JCR browser and got the following exception.

java.io.IOException: Problem in accessing repository {} - see log for details.
	at info.magnolia.module.dependencies.servlets.DependenciesServlet.doPost(DependenciesServlet.java:91)
	at info.magnolia.module.dependencies.servlets.DependenciesServlet.doGet(DependenciesServlet.java:67)
	[...]
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jcr.PathNotFoundException: demo-project/untitled
	at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2706)
	at info.magnolia.cms.core.DefaultContent.<init>(DefaultContent.java:121)
	at info.magnolia.cms.core.DefaultHierarchyManager.getContent(DefaultHierarchyManager.java:239)
	at info.magnolia.module.dependencies.servlets.DependenciesServlet.getUsedInPages(DependenciesServlet.java:111)
	at info.magnolia.module.dependencies.servlets.DependenciesServlet.doPost(DependenciesServlet.java:84)
	... 74 more  

Here we have two problems:
1) dependencies check should not come into play when working on the JCR browser, that is direct deletion should be allowed.
2) we're trying to get a content by passing the path to a node data, which causes the PathNotFoundException



 Comments   
Comment by Jan Haderka [ 18/Jan/11 ]

Just to note somewhere that the fix works only for the website-jcr tree installed by Magnolia itself but not for custom trees based on the info.magnolia.module.admininterface.AdminTreeMVCHandler.

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