Live Copy module
Edition | Special Features |
---|---|
License |
|
Issues |
|
Maven site |
|
Latest |
3.2.2 |
The Magnolia Special Feature Live Copy module helps you manage complex multisite installations that share similar content. It allows you to create live copies of master sites. You can then push any changes you make in the master to the live copy pages. You do not need to manually copy similar pages to multiple locations in order to perform updates. Components and fields in components on live copy pages can be changed individually and protected from master content changes.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
<dependency>
<groupId>info.magnolia.livecopy</groupId>
<artifactId>magnolia-livecopy</artifactId>
<version>3.2.2</version>
</dependency>
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:
-
Open the Pages app.
-
Select the site/tree/page you want to copy.
-
Click Create live copy in the action bar.
-
Choose a location for the live copy in the Choose page location dialog.
-
Finally, create a matching site definition for your freshly created live copy site.
In the Live Copy column of the Pages app, the two sites are indicated using an icon:
Master | Live 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
,
if it is called Route-66
, then the live copy is named Route-67
.
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 select the correct location for the copy in the chooser. Initially the choice is limited to the root. If you have several existing live copies and are copying a new subpage from the master, for example, you have more locations available. |
Creating live copy subpages
If you have added a new page to a master site, you must create a live copy of the new page so that its equivalent exists in the live copy site before you can push master changes to it. Newly created pages are not added automatically to a live copy upon pushing master changes.
If several live copies of a master exist, when you create a live copy of the subpage(s), you can choose where to locate the new subpage live copy. The live copy or copies are created in each location specified.
Navigating between master and live copy
You can:
-
Jump from a live copy page to the corresponding master page. To do so, open the live copy page and click Open master page in the action bar.
The master page opens in a new tab. To be able to see this action, make sure you don’t have a component selected in the page. -
View live copies from a master page. To do so, select a master page in the app browser view and click Show linked live copy pages in the action bar. A dialog opens listing the live copy or copies corresponding to the selected master. You can choose to Open them in tabs or Show in browser (they are highlighted in the browser).
Managing links
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, in many scenarios, the links should point to pages in the live copy site.
To automatically change the links so that they link to within your live copy site, select the live copy page(s) and click Relink all pages to live copy pages.
Make sure the corresponding pages in the live copy exist so that the links can be relinked within the live copy. |
In the Relink all pages popup that appears, you have the option of disabling updates from master on components that are relinked. This means the relinked live copy pages are protected from being overwritten when new content is pushed from the master. The relinked components appear as locked in the live copy pages. For example:
Pushing changes from master to live copy pages (and publishing)
When you change content on your master page and want to push your changes to a matching live copy page, use the Push master changes or Push master changes incl. subnodes actions.
In the Push master content changes dialog that appears, select the live copy or copies you want to push changes to. You can push your changes to the live copy pages with the Push button or push your changes and publish your live copy pages in one operation with the Push and publish button.
Use the Automatically relink option to automatically relink all links in the live copy so that they point to within your live copy site, instead of pointing to the master site, if required.
Push
When you click Push, the content in the live copy is updated as follows:
-
Content, including personalized content – This includes page properties, component ordering, added and/or removed components.
-
Page position – If a child page in the master site is moved to a different location, then the equivalent live copy child page is moved too.
-
Page variants.
-
Page links – Depending on the Automatically relink option.
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 changes to it. Newly created pages are not added automatically upon pushing master changes. If you have deleted a page from the master site, you must delete the equivalent live copy page too if required. Pushing master changes with or without including subnodes does not delete pages from the live copy. |
Push and publish
When you click Push and publish, a second step in the dialog opens where you can add a comment and schedule a date and time for the publication task for your live copy pages.
When you click Push & publish now, the content in the live copies is updated as described above and the publication workflow is triggered for your live copy pages.
When you create a live copy from a master, the master is set to modified. You can see the publication status goes from green to yellow in the Pages app browser. Live copies are not published upon creation; you must publish them individually using the standard Publish action or when pushing changes from master.
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 changes are 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 in the Pages app browser:
-
Single components
To protect a component, edit the page, select the component, and click Disable updates from master. The component bar changes to white and is marked with an unlinked icon:
In the case of complex components with many fields within fields, note that all the nodes are protected when updates are disabled from master.
For example, if a contact component has multiple fields and subfields as part of an address, the component node is locked and each individual field node is also locked to ensure they are not overwritten by content from the master:
-
/live-copy/multi-page/contact/0
— The component itself -
/live-copy/multi-page/contact/0/multi0
— A complex field in the component -
/live-copy/multi-page/contact/0/multi0/address
— A subfield within the complex field-
Single fields in a 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.
When only one or some of the fields in a component are locked, the component bar remains green but the unlinked icon is white:
-
You can protect a field in one language and not another by switching the language and then clicking on the protect field icon. |
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
. You can see this property in 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.
Deleting the master
If you delete the master, a warning appears to confirm deletion. The warning gives a list of linked pages that may be affected. Once the master is deleted, any of its previously created live copies can then be used as masters.
Internationalization
For single-tree multi-language websites, you must use
info.magnolia.livecopy.i18n.LiveCopyI18nContentSupport
in
the Live Copy’s site definition. This class introduces a masterLocale
property which holds the fallback language from the master copy.
You must also enable multilanguage authoring in /config/server/i18n/authoring
and set the class to info.magnolia.livecopy.i18n.LiveCopyMultiSiteI18nAuthoringSupport
.
Release history
Live Copy module 3.2.2
Released on March 3, 2021.
Bug fixing release:
-
Push action does not always push content. LIVECOPY-242
-
Issues with i18n. See Live Copy internationalization. LIVECOPY-244
Live Copy module 3.2.1
Released on January 28, 2021.
This bug fixing release also brings full compatibility with Magnolia 6.2.6 and the following improvement:
Protect fields per language
You can protect a field in one language and not another using the language switcher and then clicking on the protect field icon. For example if you want to protect the German version of a given field and not the English version, you switch to German and protect the field. When you switch back to English, the field is not protected.
Live Copy module 3.2
Released on August 26, 2020
This release brings full compatibility with Magnolia 6.2.2 and the new UI framework as well as some new functionality and improvements:
Improvements
-
[LIVECOPY-108] - Open the Master Page from a live copy
-
[LIVECOPY-42] - Add a
open as new window
button for each page in the ReferencedPagesField -
[LIVECOPY-44] - Show if the referenced page has page variations in the ReferencedPagesField
-
[LIVECOPY-145] - When I delete Master, LC still shows link to (and actions) to Master
-
[LIVECOPY-149] - Locking the component when using the Relink live copy function should be optional
-
[LIVECOPY-150] - Only push master content pages to specific pages
-
[LIVECOPY-151] - When pushing master content changes users can auto publish content
-
[LIVECOPY-159] - Fields under composite/switchable/multi fields are protected independently from the parent field
-
[LIVECOPY-190] - Change the color of a partially protected component (only certain fields are disabled)
Bug fixes
-
[LIVECOPY-171] - Protect/unprotect complex fields
-
[LIVECOPY-194] - Push master content changes position of component order
-
[LIVECOPY-195] - Enable/disable updates for component does not update the detail page
Live Copy module 3.1.2
Released on August 20, 2020.
This release provides the following bug fixes:
-
[LIVECOPY-173] - Push master content changes position of component order
-
[LIVECOPY-178] - NPE is thrown when attempting to create a live copy from page
-
[LIVECOPY-217] - Live Copy relink does not work
-
[LIVECOPY-218] - ItemNotFound exception when pushing master content changes
Live Copy module 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.
These are legacy versions of Live Copy, previously available in the Magnolia Professional Services Incubator.
Live Copy compatibility
In versions predating 3.1 and 2.0.7 this module was in the Incubator. Uninstall previous versions before installing 3.1 (or 2.0.7 - Magnolia 5.6). |
Module version | Magnolia version |
---|---|
3.2.2 |
Magnolia 6.2.6 |
3.2.0 |
Magnolia 6.2.2 |
3.1.2 |
Magnolia 6.1 |
3.1.1 |
Magnolia 6.1 |
3.1 |
Magnolia 6.1 |
3.0 |
Magnolia 6.0 |
2.1.1 |
Magnolia 5.7 |
2.1 |
Magnolia 5.7 |
2.0.7 |
Magnolia 5.6 |
2.0.5 |
Magnolia 5.6 |
2.0.4 |
Magnolia 5.6 |