[MGNLUI-4067] ItemNotFoundException when using RescueSecuritySupport Created: 03/Nov/16  Updated: 24/Mar/23  Resolved: 15/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: workbench
Affects Version/s: 5.4.10, 5.5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Git Code Review
opened during git code review in MAGNOLIA-6617 Rescue user created by RescueSecurity... Closed
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
Epic Link: Security maintenance

 Description   

To reproduce in magnolia.properties use info.magnolia.cms.security.SecuritySupport=info.magnolia.cms.security.RescueSecuritySupport

  • login as superuser
  • go to security app and change any user's property
  • save

The saving operation is successful however the following warnings show up in the logs

WARN  agnolia.ui.workbench.tree.HierarchicalJcrContainer: Cannot determine parent for itemId: info.magnolia.ui.vaadin.integration.jcr.JcrNodeItemId@51e8122: javax.jcr.ItemNotFoundException: Root node doesn't have a parent
WARN  agnolia.ui.workbench.tree.HierarchicalJcrContainer: Cannot determine parent for itemId: info.magnolia.ui.vaadin.integration.jcr.JcrNodeItemId@d3a13629: javax.jcr.ItemNotFoundException: Root node doesn't have a parent

Did some debugging and the problem occurs when rendering the users view: info.magnolia.ui.workbench.tree.TreeRowScroller#expandTreeToNode tries to get the parent of the currently visible node. At some point, it gets to the root node and then the condition at #103 of info.magnolia.ui.workbench.tree.HierarchicalJcrContainer#getParent erroneously returns false. So instead of returning null the next instruction is executed which generates the warning (understandably, as root has no parent). Eventually the error is logged and null returned.


Generated at Mon Feb 12 09:12:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.