ibexa

Path

ez publish / user manual / 5.x / daily tasks / copying content


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Copying content

The administration interface allows you to copy nodes (pages). Please note that when you make copies, the information will be duplicated. This means that if you edit the original node, the copy will not be updated and if you edit the copy, the original will not be changed. The following text explains how you can copy a single node from one location to another.

  1. Navigate the node tree until you find the node that you wish to make a copy of. If you're using the "Sub items" window, make sure that the target node is displayed in the list.
  2. Click the node's icon (either in the tree menu on the left or in the "Sub items" window) in order to bring up the context menu.
  3. Select "Copy", the system will bring up the browse interface.
  4. Use the browse interface to choose a location for the copy that will be made.
  5. Click OK - the node will be copied to the selected location.

Please note that the instructions above will only make a copy of the selected node. Any additional nodes that are located below the selected node will not be copied. For example, if you use this method to copy a folder called "News" which contains several articles, the system will only make a copy of the "News" folder itself, but not the articles. Please refer to the following section for details about how to copy an entire subtree of nodes.

Copying a subtree of nodes

An entire subtree of nodes can be copied using the "Copy subtree" function. This function can be reached using the context menu. Please note that the default configuration setting only allows you to copy up to 30 nodes within one operation. If you attempt to copy a subtree that contains more than 30 nodes, the system will display a warning and refuse to carry out the operation. This can be solved by increasing the value of the "MaxNodesCopySubtree" directive in a configuration override for "content.ini". The following list of steps explain how you can copy an entire collection of nodes from one location to another.

  1. Navigate the node tree until you find the node that you wish to make a copy of. If you're using the "Sub items" window, make sure that the target node is displayed in the list.
  2. Click the node's icon (either in the tree menu on the left or in the "Sub items" window) in order to bring up the context menu.
  3. Select "Copy subtree", the system will bring up the browse interface.
  4. Use the browse interface to choose a target location for the copy that will be made.
  5. Click OK - the node and its underlying nodes will be copied to the selected location.

Please note that it is not recommended to use the administration interface for copying large subtrees. The browser might time out in the middle of the operation and thus the database would be left in an inconsistent state. To solve this issue you can either increase the timeout or simply use the "ezsubtreecopy.php" script instead which is located in the "/bin/php" directory of an eZ Publish installation (you'll need to have PHP CLI installed and access to the command line).

Note: When using the command "Copy subtree", and you receive the error message "Subtree was not copied" with a warning "Cannot publish object", the reason might be the following: The object is set up with an event approval work-flow in order to publish it. In this case, you can disable the work-flow*, redo the copy, and then enable the work-flow* again.

*Click the "Setup" tab, go to the "Triggers" menu, and then select "No work-flow" in rows with content module and publish function. You enable it again by going back to the same screen and connect the work-flow again.

Balazs Halasy (07/05/2010 9:02 am)

Geir Arne Waaler (07/09/2010 11:10 am)


Comments

There are no comments.