7

We are currently working in Java to export data from a tridion environment, creating files like template.tctcmp and template.dwt. When importing these files back into tridion with the core service, no problem arises except, when trying to import the dreamweaver file I get 2 ICoreServiceSaveCoreServiceFaultFaultFaultMessage errors:

"'tcdl' is an undeclared prefix. Line 3, position 8."

and

"Unable to parse compound template content"

Of course there is a tag in the dreamweaver template, but how would you go on in to importing the template back into tridion?

The current code I am using:

template = (TemplateData) endpoint.getDefaultData(ItemType.TEMPLATE_BUILDING_BLOCK, folderUri);
template.getTitle().setValue(filename);
template.setContent(objectFactory.createTemplateDataContent(content);
this.endpoint.save(template, null);   

Where content is the text from the dwt file.

  • Dare I ask why are you doing this instead of using Content Porter? – Nuno Linhares Jul 2 '13 at 20:39
  • @NunoLinhares sure, because that thing doesn't work properly in SDL Tridion 2011 SP1, or atleast not the way we would like it to. – Roy Teeuwen Jul 4 '13 at 7:30
9

The problem might be that you are not setting TemplateType property. Check what is your TemplateType, or set it to DreamweaverTemplate

| improve this answer | |

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.