[MAGNOLIA-5494] Cannot delete (by mark node as deleted) already published node with versionable child with different type from its parents type. Created: 16/Nov/13  Updated: 06/Feb/14  Resolved: 06/Feb/14

Status: Closed
Project: Magnolia
Component/s: activation, core
Affects Version/s: 5.1.1
Fix Version/s: 5.2.1

Type: Bug Priority: Major
Reporter: Radosław Janas Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: next
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MAGNOLIA-5558 MarkNodeAsDeletedCommand is not flexi... 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
Date of First Response:

 Description   

Steps to reproduce in 'contacts' app:

  1. Allow to add mgnl:content as a child node to contact (child type is important, it cannot be 'mgnl:contact' !)
  2. Create new contact
  3. Create new mgnl:content under newly created contact
  4. Publish/Activate contact
  5. Delete (mark node as deleted) contact.
  6. An error message appears with sth like 'failed to build path of: [uuid]'

What is weird, if we delete contact first, then everything is ok:

  1. Create new contant
  2. Create new mgnl:content under newly created contact
  3. Delete (mark node as deleted) contact.
  4. Revert last contact version
  5. Publish contact
  6. Delete (mark node as deleted) contact.
  7. Everything is OK.

I discovered that version created by delete action in mgnlVersion repository is differen from that created by publish action (both are recursive in this case). If you check jcr mgnlVersion repo you will notice that 'activate' action creates contact children under root path ('/'), but delete action creates them under contact node.

In many cases (like mgnl:page under mgnl:page) publish/activate works well because structure created in mgnlVersion repo in this specific case is proper - the problem appears when child node has different type from its parent type.



 Comments   
Comment by Radosław Janas [ 22/Nov/13 ]

This may be related to MAGNOLIA-5492

Comment by Radosław Janas [ 06/Feb/14 ]

Tested in magnolia 5.2.1 and works fine.
This issue should be closed.

Comment by Jan Haderka [ 06/Feb/14 ]

Thanks for extra info and testing.

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