[PUBLISHING-149] Publishing including children marked as deleted results in wrong status Created: 24/Sep/18  Updated: 01/Nov/22  Resolved: 01/Nov/22

Status: Closed
Project: Publishing
Component/s: None
Affects Version/s: 1.3.5
Fix Version/s: 1.3.5, 1.4.0

Type: Bug Priority: Neutral
Reporter: Jonathan Ayala Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: maintenance
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-09-24 at 15.48.17.png     PNG File Screen Shot 2018-09-24 at 15.57.39.png     PNG File Screen Shot 2018-09-24 at 15.59.04.png    
Issue Links:
Relates
relates to PUBLISHING-57 Publishing with subnodes fails when o... Closed
causality
duplicate
is duplicated by PUBLISHING-72 Deleted subnode leads to inconsistent... Closed
is duplicated by PUBLISHING-138 Publication status is not correct aft... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PUBLISHING-151 Implementation Sub-task Completed Antonín Juran  
PUBLISHING-152 Code review Sub-task Completed Sang Ngo Huu  
PUBLISHING-153 Pre-integration QA Sub-task Completed Sang Ngo Huu  
PUBLISHING-154 Final QA Sub-task Completed Roman Kovařík  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 22
Story Points: 2
Team: Nucleus

 Description   

Steps to reproduce:

  • AdminCentral (Author)
    1.- Create a page tree like the following:

    2.- Publish including subnodes
  • AdminCentral (Public)
    3.- Remove one of the sub pages in the tree
  • AdminCentral (Author)
    4.- Remove same node: 

5.- Publish including subnodes from the root of the tree and see the wrong behavior:

In the logs appears the following trace thrown from info.magnolia.publishing.transactional.receiver.operation.jcr.JcrTransactionUnpublicationOperation:

operation.jcr.JcrTransactionUnpublicationOperation: Unable to delete /publication-test/sub2:website. Node not found on public instance.

Tested same case with Activation and worked fine maintaining tree's previous status of published.

 



 Comments   
Comment by Antonín Juran [ 07/Oct/22 ]

Discovery

After publishing the node is removed in DefaultSender#onSendDone method using Node#remove() method.
Since the Node here is implementation of MgnlPropertySettingNodeWrapper the remove() method updates last modified date of its parent node (if comes from website workspace) - it causes incorrect (modified) publication status.
The node should be unwrapped before removing in the DefaultSender#onSendDone:

NodeUtil.deepUnwrap(n, MgnlPropertySettingNodeWrapper.class).remove().

Comment by Roman Kovařík [ 01/Nov/22 ]

QA:

Reproduce the issue:

  1. Mark https://demo.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/sportstation/about:: as deleted
  2. Publish recursive https://demo.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/sportstation/:: 
  3. Approve the task https://demo.magnolia-cms.com/.magnolia/admincentral#app:tasks-app:browser
  4. Check status of https://demo.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/sportstation, it's yellow

Verify this fix:

  1. Mark https://nightly.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/sportstation/about:: as deleted
  2. Publish recursive https://nightly.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/sportstation:: 
  3. Approve the task https://nightly.magnolia-cms.com/.magnolia/admincentral#app:tasks-app:browser;
  4. Check status of https://nightly.magnolia-cms.com/.magnolia/admincentral#app:pages-app:browser;/travel::, should be green

 

Generated at Mon Feb 12 10:35:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.