[MAGNOLIA-7037] InvalidItemStateException can occur when trying to remove node with versions Created: 18/May/17  Updated: 06/Mar/19  Resolved: 06/Mar/19

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.5
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jaroslav Simak Assignee: Unassigned
Resolution: Workaround exists Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
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   

javax.jcr.InvalidItemStateException can sometimes occur when calling node.remove() (and most likely also when calling session.removeItem(absPath)).

This happens when node has versions, and has pending changes (changes that weren't saved) before calling node.remove() (session.removeItem(absPath)). It's due to removing mixin mgnl:hasVersions from the original node. This call happens when whole version history for the original node is removed.
Unfortunately removing the mixin happens in another session than removing the actual node - so using current (not system) session should resolve the issue.

Workaround is easy : save node before removing it.



 Comments   
Comment by Richard Gange [ 06/Mar/19 ]

Hi,

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Best regards,

The Magnolia Support Team.

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