Uploaded image for project: 'Live Copy'
  1. Live Copy
  2. LIVECOPY-314

The action "Publish incl. live copy sites" doesn't publish variation nodes when more than one slave site is selected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 3.2.8

    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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              malupion Manuel Alejandro Lupión Jiménez
              Clara Armengol
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD