[LIVECOPY-314] The action "Publish incl. live copy sites" doesn't publish variation nodes when more than one slave site is selected Created: 18/May/22 Updated: 26/Aug/22 |
|
| Status: | Open |
| Project: | Live Copy |
| Component/s: | None |
| Affects Version/s: | 3.2.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Manuel Alejandro Lupión Jiménez | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Livecopy | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
| Visible to: |
Clara Armengol
|
| Epic Link: | AuthorX Support |
| Team: |
| Description |
|
We have detected that after the publication of the first slave site, the release() method of the BaseRepositoryCommand class is called from the executeSynchronized() method of the info.magnolia.commands.MgnlCommand class. This method resets the value of the "itemTypes" property of the personalizationActivation command, removing the "mgnl:componentVariants" value. Continuing the publication of the second slave site, since it uses the same command instance that has previously been reset, it only publishes the content nodes and not the variations nodes.
info.magnolia.livecopy.workflow.workitem.PublishLinkedResourcesWorkItemHandler if (CollectionUtils.isNotEmpty(dependencies)) { Boolean recursive = false; if (mgnlData != null && mgnlData.containsKey(Context.ATTRIBUTE_RECURSIVE)) { recursive = (Boolean) mgnlData.get(Context.ATTRIBUTE_RECURSIVE); } // Gets the command Command command = this.commandManager.getCommand(this.definition.getCatalog(), this.definition.getCommandName()); // Browse the dependencies for (Dependency dependency : dependencies) { log.info("Publishing the linked resource {}:{}", dependency.getWorkspace(), dependency.getJcrId()); this.publishDependency(command, dependency, recursive); } }
our solution as workaround: if (CollectionUtils.isNotEmpty(dependencies)) { Boolean recursive = false; if (mgnlData != null && mgnlData.containsKey(Context.ATTRIBUTE_RECURSIVE)) { recursive = (Boolean) mgnlData.get(Context.ATTRIBUTE_RECURSIVE); } // Browse the dependencies for (Dependency dependency : dependencies) { log.info("Publishing the linked resource {}:{}", dependency.getWorkspace(), dependency.getJcrId()); // Gets the command Command command = this.commandManager.getCommand(this.definition.getCatalog(), this.definition.getCommandName()); this.publishDependency(command, dependency, recursive); } }
Regards, Manuel. |