Page tree
Skip to end of metadata
Go to start of metadata

Live Copy helps you manage complex multisite installations that share similar content. It allows you to create live copies of master sites. The live copies are automatically updated when you make changes to the master. This means you only have to manage the master content and push it to the live copy pages. You do not need to manually copy similar pages to multiple locations in order to perform updates. Components on live copy pages can be changed individually and protected from master content changes.

Installing

Maven is the easiest way to install the module. Add the following dependencies to your webapp. All the other necessary dependencies will be brought in automatically:

<dependency>
  <groupId>info.magnolia.livecopy</groupId>
  <artifactId>magnolia-livecopy</artifactId>
  <version>3.1</version>
</dependency>

Pre-built JARs are also available for download. See Installing a module for help.

This module is located in the addons.releases repository and requires additional changes to your Maven settings file.

In order to access the incubator repository, you must make some changes to your Maven settings file.

 Click to see a sample settings.xml file for DX Core customers.

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

   <!-- This is a settings.xml file retrieved from https://nexus.magnolia-cms.com -->

  <servers>
    <server>
      <id>magnolia.nexus.enterprise</id>
      <!-- Token, not actual username / password -->
      <username>username</username>
      <password>password</password>
    </server>

    <server>
      <id>magnolia.addons.releases</id>
      <!-- Token, not actual username / password -->
      <username>username</username>
      <password>password</password>
    </server>
  </servers>

  <profiles>
    <profile>
      <id>magnolia-repositories</id>
      <repositories>
        <repository>
          <id>magnolia.nexus.enterprise</id>
          <url>https://nexus.magnolia-cms.com/content/groups/enterprise/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
        <repository>
          <id>magnolia.addons.releases</id>
          <url>https://nexus.magnolia-cms.com/content/repositories/magnolia.addons.releases</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
            <id>magnolia.nexus.enterprise</id>
            <url>https://nexus.magnolia-cms.com/content/groups/enterprise/</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>magnolia-repositories</activeProfile>
  </activeProfiles>

  <pluginGroups>
    <!-- define the sonatype plugin group, so the nexus plugins will work without typing the groupId -->
    <pluginGroup>org.sonatype.plugins</pluginGroup>
  </pluginGroups>

</settings>

Usage

Live Copy works by creating a copy of a master website. The master can be an entire site, a sub-tree or just a single page.

Note

As a lot of content can be copied and linked, a single wrong action can have a negative impact on a big part of your website. Plan your content structure in detail before using Live Copy.

Give the rights to execute Live Copy actions to privileged users with sufficient instructions only.

Creating a live copy

To create a live copy:

  1. Open the Pages app.
  2. Select the site/tree/page you want to copy.
  3. Click Create live copy in the action bar.
  4. Choose a location for the live copy in the dialog. 
  5. Finally, create a matching site definition  for your freshly created live copy site.

In the Livecopy column of the Pages app, the two sites are indicated using an icon:  

MasterLive Copy

Note that the newly created live copy site follows the same naming conventions as the standard copy action. For example, if your master site is named travel, then the new live copy site is named travel0. We recommend you rename the live copy site.

You can copy just a sub-tree or a single page instead of a whole site. You have to move the copy to the correct location afterward in the choose.

Typically your master site contains links that are internal to the master site. The links in your newly created live copy site will still point to that master content. This can be desirable in some situations. However, there may be scenarios where the links should point to pages in the live copy site.

To automatically change the links to your live copy site you can use the Relink all pages to live copy pages action. Rewritten links are automatically protected from being overwritten when new content is pushed from the master.

Pushing content from master to live copy pages

When you change content on your master page and want to push this content to the matching live copy page, use the Push master content changes or Push master content changes incl. subnodes actions.

The content in the live copy page is updated as follows:

  1. Content including personalized content.
    This includes page properties, component ordering, added and/or removed components.
  2. Page position.
    1. If the master page is moved to a different location, then the live copy page is moved to the equivalent position.
    2. If the master page does not exist, then the page stays in the same location.

  3. Page variants.

If you have added a new page to the master site, you must create a live copy of the new page to create it in the copied site before you can push master content changes to it. Newly created pages are not added automatically upon pushing master content changes.

Protecting content from master content changes

Components within a live copy page are marked with an extra icon: . This helps you to differentiate between live copy content and unlinked content.

You may not want all the content in your live copy pages to be overwritten when master content is pushed. You can protect the content in:

  • Full pages – To protect a full page, select the live copy page and click Disable updates from master. The page is marked with an unlinked icon: 
  • Single components – To protect a component, edit the page, select the component, and click Disable updates from master. The component is marked with an unlinked icon: 
  • Single fields in your component – To protect a field within a component, edit the component then select the fields that should not be overwritten on the next content push from your master content:

    The red icon in the screenshot above indicates that the field is not linked to the master content. The grey and white icon indicates that the field is linked to the master content.

Breaking and reattaching

You can break the link of the live copy pages. The linking of live copy pages to master content is done using a page property called masterContentIdentifier. This is visible through the JCR Browser or via content export. To break this link, select a page and click Disable updates from master. After confirmation, the page no longer receives updates from the master page.

Breaking the link to master content is achieved through a page property called liveCopyReferenceDropped. When this flag is set to true, the linking of content is turned off. However, the masterContentIdentifier still remains and the content can be re-linked at any time. To reattach the live copy content to the master content, click Enable updates from master.

Internationalization

For single-tree multi-language websites, there is info.magnolia.liveCopy.i18n.LiveCopyI18nContentSupport to be used in the Live Copy's site definition. This class introduces a masterLocale property which holds the fallback language from the master copy.


Release history

Live Copy 3.1

Released on July 5, 2019.

Live Copy is now a Special Features module. Live Copy helps you manage complex multisite installations that share similar content by creating live copies of master sites.

 Before 3.1 this module was in the Incubator. Click here to see the release history.

For documentation for these legacy versions of Live Copy, see Incubator - Live Copy.

Version 3.0

Updated for Magnolia 6.0 compatibility.

Version 2.1.1

LIVECOPY-49 - Getting issue details... STATUS

LIVECOPY-46 - Getting issue details... STATUS

LIVECOPY-45 - Getting issue details... STATUS

LIVECOPY-41 - Getting issue details... STATUS

LIVECOPY-40 - Getting issue details... STATUS

Version 2.1

Updated for Magnolia 5.7 compatibility.

LIVECOPY-38 - Getting issue details... STATUS

Version 2.0.6

LIVECOPY-77 - Getting issue details... STATUS

Version 2.0.5

POM edited to prevent versioning clash with  magnolia-pages-editor-widget

Version 2.0.4

LIVECOPY-71 - Getting issue details... STATUS

LIVECOPY-67 - Getting issue details... STATUS

LIVECOPY-61 - Getting issue details... STATUS

LIVECOPY-8 - Getting issue details... STATUS

Version 2.0.3

LIVECOPY-46 - Getting issue details... STATUS

LIVECOPY-45 - Getting issue details... STATUS

LIVECOPY-41 - Getting issue details... STATUS

LIVECOPY-40 - Getting issue details... STATUS

Version 2.0.2

LIVECOPY-28 - Getting issue details... STATUS

LIVECOPY-27 - Getting issue details... STATUS

LIVECOPY-25 - Getting issue details... STATUS

Version 2.0.1

LIVECOPY-33 - Getting issue details... STATUS

LIVECOPY-32 - Getting issue details... STATUS

Version 2.0

Initial release of the Incubator (previously called Extensions) version of the module.

LIVECOPY-31 - Getting issue details... STATUS

LIVECOPY-23 - Getting issue details... STATUS

Live Copy add-on compatibility

3.1Magnolia 6.1

Before 3.1 this module was in the Incubator

Uninstall previous versions before installing 3.1.

3.0

Magnolia 6.0

2.1.1

Magnolia 5.7

2.1

Magnolia 5.7

2.0.6

Magnolia 5.6

2.0.5

Magnolia 5.6

2.0.4

Magnolia 5.6