[LIVECOPY-237] Variants are not published Created: 10/Dec/20  Updated: 21/Jun/21  Resolved: 18/Jun/21

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: 2.2, 3.2.3
Fix Version/s: 2.2.1, 3.2.4

Type: Bug Priority: Medium
Reporter: Jonathan Ayala Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: VN-Analysis, VN-Implementation, maintenance
Remaining Estimate: 0d
Time Spent: 2d 7h
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2020-12-10 at 12.30.16.png    
Issue Links:
Problem/Incident
Relates
relates to PUBLISHING-87 Publish a page does not include variants Closed
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: Live Copy maintenance
Sprint: Content Mngmt 6
Story Points: 5

 Description   

Steps to reproduce

  1. Create page and create live copy
  2. Add a component to the original page with variants
  3. Push master content
  4. Publish inc. ref. sites

Expected results

Page and its variants are published

Actual results

Variants are not published. By setting Packager to debug we can see that variants are ignored:

Development notes

Although personalizationActivation is set in configuration /modules/workflow/commands/workflow/activateLiveCopy, which points at mgnl:componentVariants as itemType, activate command from versioned catalog is set explicitly in info.magnolia.liveCopy.workflow.workitem.PublishLinkedResourcesWorkItemHandlerDefinition and info.magnolia.liveCopy.workflow.workitem.PublishLinkedResourcesWorkItemHandler.

  1. By setting catalog and commandName properties to workflow and activateLiveCopy in /modules/livecopy/workItemHandlers/publishLinkResources nothing changes(restarting the server as required by work item handlers configuration)
  2. Creating custom classes to replace info.magnolia.liveCopy.workflow.workitem.PublishLinkedResourcesWorkItemHandlerDefinition and{{info.magnolia.liveCopy.workflow.workitem.PublishLinkedResourcesWorkItemHandler}} neither work although workflow and activateLiveCopy are explicitly set.


 Comments   
Comment by Marvin Kerkhoff [ 02/Jun/21 ]

We have found the issue of it. The Publishing for masters and slaves works fine for the master. But all slaves are not published through the usual workflow activation command. Instead it is using the default publishing definition:

https://demo.magnolia-cms.com/.magnolia/admincentral#app:configuration:browser;/modules/publishing-core/commands/default/publish:treeview:

But here are no itemTypes set.

If you add an itemTypes Property with value mgnl:contentNode,mgnl:componentVariants it all works as expected. But this is just the workaround. It needs to be fixed that the publishing vor slaves works with the usual workflow command. Idealy it should be configurable or extensable because in bigger projects there are a lot of custom workflows around.

Comment by Oanh Thai Hoang [ 17/Jun/21 ]

PR for 3.2.4 (master now) has been merged.

The step to reproduce with 3.2.4 will a bit different than in the ticket descriptor.

  • Create 1 test page (choose basic template), add 1 html component and without variant component
  • Create 1 live copy
  • See test0 (slave) has been created
  • Back to test page, add 2 variant html component
  • Click to Push Master Change Action
  • Click to Push And Publish (will help to publish include slaves) when dialog open. See 
  • Click to Push And Publish now when dialog open. See 
  • Go to publish instance and see test and test0 have been published, but only test has 2 variants, test0 does not

Note Look at the record script if you has problem with step to reproduce

 

Output after fixing

Generated at Mon Feb 12 02:26:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.