[PUBLISHING-57] Publishing with subnodes fails when one of them is for deletion Created: 30/Apr/19 Updated: 29/Mar/22 Resolved: 06/Sep/19 |
|
| Status: | Closed |
| Project: | Publishing |
| Component/s: | None |
| Affects Version/s: | 1.0.7 |
| Fix Version/s: | 1.0.8, 1.1.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| 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: | Support | ||||||||||||||||
| Sprint: | Maintenance & Releases | ||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Team: | |||||||||||||||||
| Description |
|
Timebox for investigation: 3 SP Description: When having a tree of nodes, for example pages, if we delete one of them and publish the whole tree (publish with subnodes), nodes processed after the deleted one won't be published but unpublished, which make it fail and appear as unpublished. Here's how to reproduce:
Setting log level to DEBUG in the public instance for info.magnolia.publishing.transactional.receiver.operation.jcr.JcrTransactionUnpublicationOperation we can see following traces: javax.jcr.ItemNotFoundException: 65fefc8b-18c3-4c1a-ad63-6564e0cec916 ... Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 65fefc8b-18c3-4c1a-ad63-6564e0cec916 This problem appears in info.magnolia.publishing.sender.AbstractSender.send(List<Node>, Rule, boolean) method, specifically in these lines (154-155): publication = publication && !NodeUtil.hasMixin(node, NodeTypes.Deleted.NAME); Optional<SendOperation> operation = publication ? getOperationByName(PUBLISH) : getOperationByName(UNPUBLISH); when any of the nodes is marked for deletion, publication will be always false for the next nodes, which will be traduced as an unpublish operation for all of them. Therefore, it ends up causing the exception shown above when trying to remove the node.
|