3

I have some components in child publication and I am trying to move the content to parent publication by using Content Porter.

Components are part of "Child" folder from child publication and destination is "Parent" folder from the parent publication. For this, I have done below changes in mappings.xml file from content package.

mappings.xml file snapshot

With these changes, it is not moving the components to parent publication but it is updating the existing components in child publication.

Below is the Import Result I am getting from Content Porter.

Import finished successfully.
Start time: 3/27/2015 1:23:38 PM
End time: 3/27/2015 1:23:48 PM

Total items processed: 1
New items created: 0
Existing items updated: 1
Items partially imported: 0
Items failed: 0

Updated items:
/webdav/010Child/Building%20Blocks/Content/Child/MyName.xml

So, could you please help on this to troubleshoot and resolve steps to fix the issue.

4
  • Does the Parent folder exist on the destination CMS? You probably don't need to remap the Publication itself, just the Component. Also, are you on Tridion 2013 SP1 or just 2013? It seems SDL Tridion 2013 SP1 skips the tcccp namespace, but you need them on older Tridion versions. Commented Mar 30, 2015 at 20:52
  • "Parent" folder is part of parent publication. I tried with Component remap and still it is not working. I tried with "Target TCM version 2013 and earlier" from SDL Content Porter 2013 SP1 options.
    – Sri Siva
    Commented Mar 31, 2015 at 10:56
  • Are you changing the mappings file directly in the content porter package ZIP file? If so, try the Item mappings option (Click Edit...), which will let you know if you have any issues in the mapping file. Note that saving and reloading the import settings will clear any temporary mappings. Trying this myself, I don't expect a move (up, like Bart explains), but rather a copy. Commented Apr 1, 2015 at 6:22
  • I answered with a mapping that worked for copying a simple Test Component based on a Schema with no fields. Be sure to map all dependencies including the Schema (and probably folders). Also note that you should see new items in the import results, but the "Updated Items" seem to show the exported, rather than the mapped, paths. To get around an issue with the Default Multimedia Schema, I hacked the package by deleting the Publication in the ZIP file. :-) Commented Apr 1, 2015 at 7:24

2 Answers 2

1

To be able to port content up a BluePrint tree, you have to make sure the original content is deleted first.

Content Porter can only perform the actions you can manually perform in the UI yourself (or do via the API for that matter). For example, if you were to try and create a Component in a BluePrint parent yourself like this, you would run into a naming conflict. Because there already is a Component with that same name in a child Publication.

So your only option is to follow the following steps:

  1. Export the Component
  2. Delete the Component
  3. Import it in the Parent

Now before you can delete the Component, you will need to make sure the Component is not in use anywhere. There is no easy way around this.

2
  • The folder (Parent vs. Child) is different, so I don't think you can get a "real" move, but there shouldn't be a naming conflict since MyName could exist in both folders. Commented Mar 30, 2015 at 20:54
  • Hi Bart & Alvin, Thanks for your response. We are moving the content to another folder from parent publication. It is not allowing the content to create in parent publication folder and instead, updating the content in child publication folder.
    – Sri Siva
    Commented Mar 31, 2015 at 10:38
1

Like Bart explains, this will not be a move.

Some of this might be redundant, but here's what worked for me. Note that the Import Result shows the old, unmapped WebDAV path for the created item, though it was copied into the Parent Publication.

To help minimize dependencies, in the export I only exported the content I needed.

In the import I did the following:

  • Remapped everything related, including the folders in the WebDAV url to the Component to move
  • Removed un-related contexts
  • Edited mapping in Content Porter (this won't catch URL escaping issues, but it seems to validate the mappings XML against a schema)
  • Only imported the content
  • Selected everything but Component for the filter options
  • Unchecked Select items for import that were explicitly selected during export
  • Did not choose Resolve shared items through BluePrint mapping (though this should only impact localized items)
  • I did not change the Publication name (this only caused a naming conflict issue)

My mapping file includes the content as well as its Schema and all the folders in its path.

<?xml version="1.0" encoding="utf-8"?>
<Mappings xmlns="http://www.sdltridion.com/ContentManager/ImportExport/Package/2013">
  <ItemSet role="Publication">
    <Mapping exportTitle="010%20Schemas%20Master" importTitle="" />
  </ItemSet>
  <ItemSet role="Folder">
    <Mapping exportContext="/010%20Schemas%20Master" exportTitle="Building%20Blocks" importContext="/000%20Empty%20Parent" importTitle="" />
    <Mapping exportContext="/010%20Schemas%20Master/Building%20Blocks" exportTitle="Child" importContext="/010%20Schemas%20Master/Building%20Blocks" importTitle="Parent" />
  </ItemSet>
  <ItemSet role="Schema">
    <Mapping exportContext="/010%20Schemas%20Master/Building%20Blocks" exportTitle="Default%20Multimedia%20Schema.xsd" importContext="/000%20Empty%20Parent/Building%20Blocks" importTitle="" />
    <Mapping exportContext="/010%20Schemas%20Master/Building%20Blocks" exportTitle="Test.xsd" importContext="/000%20Empty%20Parent/Building%20Blocks" importTitle="" />
  </ItemSet>
  <ItemSet role="Component">
    <Mapping exportContext="/010%20Schemas%20Master/Building%20Blocks/Child" exportTitle="Test.xml" importContext="/000%20Empty%20Parent/Building%20Blocks/Parent" importTitle="" />
  </ItemSet>
</Mappings>

As Monica Manzano and others have pointed out, it might easier to just rename a Publication rather than doing the mapping.

While making the update I ran into two issues.

Until I completed the mappings for the Schema and Folders, I got:

Tridion.ContentManager.InvalidLinkException: Link to Schema has invalid value. ---> Tridion.ContentManager.InvalidUriException: Invalid context Publication specified in URI: tcm:4-1365-8. Expecting: 1. at Tridion.ContentManager.Utils.AssertSameContextRepositories(TcmUri uri1, TcmUri uri2)

Be sure to map the item and all of its dependencies.

Secondly, the Publication in the Content Porter package referenced the Default Multimedia Schema (tcm:1-8-8). I couldn't quite figure out the mapping for it, so I deleted the Publication out of the package as a hack. :-)

The export log hints at what to map:

Exported items: /webdav/010%20Schemas%20Master /webdav/010%20Schemas%20Master/Building%20Blocks/Child/Test.xml

Note again that the Import results do not show the mapped results, just the initial paths.

Total items processed: 1 New items created: 1 Existing items updated: 0 Items partially imported: 0 Items failed: 0

Created items: /webdav/010%20Schemas%20Master/Building%20Blocks/Child/Test.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.