3

I have run the ttm-prepare.ps1 to prepare the CD Environment for DXA (Staging only).

enter image description here

Then I run the cms-import.ps1 to import all Publications into existing CMS, but anerror occurred. Please refer to the picture below.

enter image description here

I used DXA 1.6.
I have a blueprint whose root publication is "00 Empty" in CME now, and I want to import all the publications to create a new blueprint whose root publication is "000 Empty". Is this correct?
As a reference, I added the existing blueprint below. enter image description here '00 Empty' publication with root folder named 'Building Blocks'. enter image description here
Any information would be appreciated.
Thanks in advance.

6
  • Can you check the Content Manager event log for errors, and translate the error from Japanese to English and then edit your question and add that here? In the screenshot I see a Tridion.ContentManager.InvalidActionException, but the description behind it in in Japanese, so I don't know what the actual error is, which seems to be stopping the import. Nov 30, 2016 at 7:15
  • 1
    Hi, Bart. Thanks for your reply. The words on the screenshot is neither Japanese nor Chinese. I also cannot read that. I'm confused that why the sentences went messy there.
    – Heimei
    Nov 30, 2016 at 7:22
  • I was hoping your CME was set to Japanese, since I never seen results like this in a Powershell window. What language does your Windows have? But in any case, your Windows eventlog might have a more readable error message than the Powershell windows does. Nov 30, 2016 at 7:26
  • I have edited my question. Now the error message is in English. Thanks for your remind.
    – Heimei
    Nov 30, 2016 at 7:35
  • Okay it seems Powershell uses Unicode by default for its output, and these characters seem to indicate the Powershell window doesn't support it, check out blogs.msdn.microsoft.com/powershell/2006/12/11/… for a possible solution on making Powershell more readable on your server. Nov 30, 2016 at 7:36

2 Answers 2

2

The error given is:

Only one root Folder is allowed in a Publication.

And it seems to throw that error when trying to import items in the Publication '000 Empty'.

Which is an indication that you are trying to import the all-publications package on a CMS which already has a 000 Empty Publication, and specifically one with a root Folder named differently than Building Blocks.

Content Porter (and the Import Export API), can only import using WebDAV URLs, which means the Titles of your Folders, Structure Groups and other items need to be unique since they act as an identifier. So when trying to import an entire Publication structure like is done by the DXA import package all-publications, you will either have to ensure the Publications that the import package contains do not exist, or are similar (in which case the import will merge the two).

In case you are trying to import DXA in an existing installation, I suggest you use the master-only and example-publications option (see the documentation for details http://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v6/GUID-EDB49D8A-DCC3-45E7-B809-6A8B377C4FEA). Or you need to rename the root Folder of your 000 Empty Publication into Building Blocks before the import (you can rename it back after the import if you wish, but remember to redo this action if you need to ever run DXA upgrade scripts on that system, since DXA will have the English defaults).

Update

Okay I see your Existing BluePrint structure does not contain a Publication called 000 Empty, adding to that your mention of the CMS language that was set to Japanese, there is something else happening.

As mentioned before, DXA is created on an English CME, and hence uses the English default names for root Folders. If your CM language is set to Japanese, your root Folders in a newly created Publication will not be called Building Blocks, but I'm guessing something in Japanese. This is what seems to be causing our problem.

What is happening is the following:

  1. The Import Export API creates the 000 Empty Publication as part of the import
  2. A root Folder is automatically created using the defaults of the system (in your case that will get the Japanese translation of Building Blocks
  3. The Import Export API tries to import the items in the newly created Publication, and because the export has the root Folder names as Building Blocks, it fails since there already is a root Folder with a different name

Okay that is the explanation of what's going wrong (very interesting case by the way, we'll need to add some comments about this in the DXA documentation (I'll take care of that). Now lets look at the solution, I see two possible options:

  1. You create a Publication called 000 Empty before you import, and rename its root Folder to Building Blocks, after this you should be able to import without problems

  2. You change the CM language to English before the import (make sure there is no Publication called 000 Empty left behind from the failed import)

I think option #1 is the simples and quickest solution, which doesn't have too much impact. Let us know the results and we can add these details to the DXA documentation.

2
  • I added a picture to my question. I really have a publication similar to "000 Empty" and its root Folder is already named by "Building Blocks". Do you mean that I need to change my publication's name? Since I don't want to make any influence to the existing site, I chose the all-publications type.
    – Heimei
    Nov 30, 2016 at 8:08
  • Thanks Bart. I understood the problem now and solved it using the first way you told me.
    – Heimei
    Nov 30, 2016 at 8:23
2

It looks like the import is done with a user with Japanese language. If such a user creates a new Publication, the root Folder won't be called Building Blocks, but something Japanese. So, even if the 000 Empty Publication doesn't exist yet (see Bart's answer), you will get this problem.

Possible work-arounds:

  • Use a CMS user with English language
  • Create a 000 Empty Publication and rename its root Folder to Building Blocks before running the import. You can rename it back after the import if you wish (you can specify a -rootFolder parameter on subsequent cms-import.ps1 runs with -importType master-only or for DXA Modules).
1
  • Thanks Rick. I solved the problem now. The reason is what you said.
    – Heimei
    Nov 30, 2016 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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