Courier transfer with uComponents Multi Node Tree Pickers
I am having a frustrating first attempt at using Courier 2 Express and am hoping someone can help!
I have just tried trasferring a site which contains uComponents Multi node tree picker data types for most of the document types and therefore most content nodes.
The datatypes all seem to be copied over okay but the selected nodes in the tree pickers within the transferred content seem to have been corrupted in the transfer.
For some nodes in the copied site the multi node picker data types contain content nodes in the selection when the control (and of course the original content) is defined as being a media item. In most cases this just causes the familiar 'Error parsing XSLT file' on the site and could be fixed manually by editing the content.
However for some nodes it is not even possible to view or correct the content as clicking on the node in the content section produces an exception when Umbraco tries to display that node in the backend:
For nodes where no selections have been made in the multi node pickers the transfer appears to be okay.
Does anyone know of a fix to the problem? In the short term is there a way to prevent the data from certain node types being transferred? At least that way it would be possible to transfer a working site and then have a small manual process of updating the missing multi node selections for the relevent nodes.
I could not get the error to post without (ironically) giving an 'Error parsing XSLT' on this site! So this is a second try:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Courier only supports the built in Umbraco data types out of the box and hence third party components like uComponents will not work without a provider written so that Courier understands the data types.
So in a nut shell you either need to write your own provider ( see the developer docs ) or hope that the uComponents team will soon release a provider for all their datatypes, I am sure a lot of people are also hoping the same :)
Not the answer I was hoping to hear, most of my project use the uComponents data types which is going to make using Courier hard going in the meantime.
I haven't tried this myself, but just from talking with other developers at CodeGarden 11, the issue with MultiNode Tree Picker and Courier is when you choose to store the data/value as XML. If you store it as CSV, then it "should" work fine.
Not sure how this effects other data-types in uComponents... yet! (I'm only just starting to use Courier 2 myself)
Many thanks for the answer.You are absolutely right I am storing the data as XML, it seemed the logical choice when using XSLT to create the output.
Do you know if there are any code examples for splitting and outputing CSV data using XSLT? If so changing how the data type stores the content and altering the macros might be my quickest solution on an ongoing basis.
As a short term work around, is there a simple change that I could apply to each of the Multi Node Picker data types that would result in the content nodes which have properties of that type losing their selection? (For example would changing the data type to CSV have the desired result) If so I could quickly force all the Multi node properties within all content nodes to have empty selections the Courier transfer should work and then I could do a manual tidy up of the other end.
From my understanding Courier needs you to write Providers for all third party datatypes so that it understands their structure and is able to replace node ID's with their Unique ID's ( GUID's ) and the reverse when restoring them on the target server.
Have a look at page 10 of the developer's guide for more information.
As Chris said, if you store Node Ids in a custom XML structure, you will need to write a provider to allow Courier 2 to understand that the xml structure contains IDs it should pick up.
work is in progress to have a generic xpath resolver, which can basicly work with any datatype which saves as xml, it just needs a xpath to resolve nodeIds, but for now, you have to write your own provider
Courier transfer with uComponents Multi Node Tree Pickers
I am having a frustrating first attempt at using Courier 2 Express and am hoping someone can help!
I have just tried trasferring a site which contains uComponents Multi node tree picker data types for most of the document types and therefore most content nodes.
The datatypes all seem to be copied over okay but the selected nodes in the tree pickers within the transferred content seem to have been corrupted in the transfer.
For some nodes in the copied site the multi node picker data types contain content nodes in the selection when the control (and of course the original content) is defined as being a media item. In most cases this just causes the familiar 'Error parsing XSLT file' on the site and could be fixed manually by editing the content.
However for some nodes it is not even possible to view or correct the content as clicking on the node in the content section produces an exception when Umbraco tries to display that node in the backend:
For nodes where no selections have been made in the multi node pickers the transfer appears to be okay.
Does anyone know of a fix to the problem? In the short term is there a way to prevent the data from certain node types being transferred? At least that way it would be possible to transfer a working site and then have a small manual process of updating the missing multi node selections for the relevent nodes.
I could not get the error to post without (ironically) giving an 'Error parsing XSLT' on this site! So this is a second try:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Hi Matthew,
Courier only supports the built in Umbraco data types out of the box and hence third party components like uComponents will not work without a provider written so that Courier understands the data types.
So in a nut shell you either need to write your own provider ( see the developer docs ) or hope that the uComponents team will soon release a provider for all their datatypes, I am sure a lot of people are also hoping the same :)
Cheers,
Chris
Hi Chris,
Wow that was quick!
Not the answer I was hoping to hear, most of my project use the uComponents data types which is going to make using Courier hard going in the meantime.
Thanks for the answer though!
Matt
I haven't tried this myself, but just from talking with other developers at CodeGarden 11, the issue with MultiNode Tree Picker and Courier is when you choose to store the data/value as XML. If you store it as CSV, then it "should" work fine.
Not sure how this effects other data-types in uComponents... yet! (I'm only just starting to use Courier 2 myself)
Cheers, Lee.
Hi Lee,
Many thanks for the answer.You are absolutely right I am storing the data as XML, it seemed the logical choice when using XSLT to create the output.
Do you know if there are any code examples for splitting and outputing CSV data using XSLT? If so changing how the data type stores the content and altering the macros might be my quickest solution on an ongoing basis.
As a short term work around, is there a simple change that I could apply to each of the Multi Node Picker data types that would result in the content nodes which have properties of that type losing their selection? (For example would changing the data type to CSV have the desired result) If so I could quickly force all the Multi node properties within all content nodes to have empty selections the Courier transfer should work and then I could do a manual tidy up of the other end.
Thanks,
Matt
From my understanding Courier needs you to write Providers for all third party datatypes so that it understands their structure and is able to replace node ID's with their Unique ID's ( GUID's ) and the reverse when restoring them on the target server.
Have a look at page 10 of the developer's guide for more information.
Cheers, Chris
Slightly off topic but here's the code if you want to get the values from CSV:
Rich
Thanks Rich,
I have let the topic start to wonder a little! Thanks for the code sample, that's really straight forward.
Matt
As Chris said, if you store Node Ids in a custom XML structure, you will need to write a provider to allow Courier 2 to understand that the xml structure contains IDs it should pick up.
work is in progress to have a generic xpath resolver, which can basicly work with any datatype which saves as xml, it just needs a xpath to resolve nodeIds, but for now, you have to write your own provider
Thanks Per,
The generic provider sounds like a great idea!
Matt
is working on a reply...