I'm looking to deploy some new content to an existing site by creating a package, if I include the document types (which have changes) what will happen on the target site? Existing doctype will be updated or duplicate doctype will be created?
Changest to document types include new properties and template options.
I had a similar need for testing this out so I just did - these are the results of the Danish Jury:
I created a Doctype with a single textstring property
I set the description to "Original description wiht typo"
Set a single Allowed Template and set that one as the default too
Created a single Content node from that and filled in the properties
Then I created a package and selected the Doctype and the Content node to include
Downloaded the package, extracted the package.xml file and performed the following changes:
Added mandatory textstring property "powerTitle" (just duplicated the XML for the title property and changed Name and Alias)
Corrected the typo in the description
Changed AllowedTemplates and DefaultTemplate to one of the other templates already in the solution
Add the new powerTitle property to exported content node, keeping all built-in attributes in the XML
Add new content node with only @nodeName, @isDoc and the title and powerTitle properties in the XML
Then I zipped it up and tried to install it back into Umbraco - I got a YSOD that I unfortunately couldn't read (just got the customErrors explanation) - but I know that it was related to the Add content document I tried to import, because everything else went as expected:
The Doctype was updated (description typo fixed, new property added, template settings changed)
The exported content node was updated with the new powerTitle property and its Template setting reset to "Choose..." (I didn't change the @template attribute on the node so it still renders using that template, but because it's no longer allowed, the dropdown says "Choose...", with only the new allowed one available).
So - I'll just try to see if I can get new content into the tree too, without having to fake a lot of attributes... coming up in test two :-)
Thanks for the detailed response Chriztian. The error may have been logged in Umbraco or if not you could check the event logs possibly for full details of the error you got?
It was an "Input string was not in the correct format" exception due to my attempt to import a content node with almost no attributes.
I've since succeeded in importing new content by creating the standard Umbraco XML format, which works for nested content too. If I make sure to use non-existing nodeIds it works great.
It's awesome because I am now very confident in the possibility of taking an XML export from another CMS and running it through an XSLT transform creating the exact structure I want, assigning templates and everything, and then just import it. Very good & flexible for me...
Content Package with doctype changes
I'm looking to deploy some new content to an existing site by creating a package, if I include the document types (which have changes) what will happen on the target site? Existing doctype will be updated or duplicate doctype will be created?
Changest to document types include new properties and template options.
Hi Simon,
I had a similar need for testing this out so I just did - these are the results of the Danish Jury:
Then I created a package and selected the Doctype and the Content node to include
Downloaded the package, extracted the package.xml file and performed the following changes:
Then I zipped it up and tried to install it back into Umbraco - I got a YSOD that I unfortunately couldn't read (just got the customErrors explanation) - but I know that it was related to the Add content document I tried to import, because everything else went as expected:
So - I'll just try to see if I can get new content into the tree too, without having to fake a lot of attributes... coming up in test two :-)
/Chriztian
Thanks for the detailed response Chriztian. The error may have been logged in Umbraco or if not you could check the event logs possibly for full details of the error you got?
Simon
It was an "Input string was not in the correct format" exception due to my attempt to import a content node with almost no attributes.
I've since succeeded in importing new content by creating the standard Umbraco XML format, which works for nested content too. If I make sure to use non-existing nodeIds it works great.
It's awesome because I am now very confident in the possibility of taking an XML export from another CMS and running it through an XSLT transform creating the exact structure I want, assigning templates and everything, and then just import it. Very good & flexible for me...
/Chriztian
is working on a reply...