Is there any Courier support for Nested Content? When transferring items with Nested Content fields with document types containing Media Pickers and Content Pickers, the references in those fields are broken.
Because of some problems with different assembly versions I copied the code for the NestedContentDataResolverProvider into my project, and had it reference the assemblies I my project. I subsequently had a problem due to DocTypes in the various environments with the same alias but apparently different guids. After changing the code for the DocType lookup to use only the alias it seems to work.
I finally got around to trying out the courier resolver for Nested Content earlier this week. I found a couple of issue with it and fixed accordingly (as all good open-source citizens should do) :-D
Yes, build the VS project, copy the .dll (and .pdb if you want debugging info) into your website's /bin folder... and that's it. Courier will pick it up and do the rest.
Hi Lee,
Some of the guys here have been using nested content inside doc type grid editors in the grid. Looking at this scenario I can't see the data resolver working but can chuck some dev resource at it this week to make a start. If you have any advice or pointers to give them a head start it would be good to have a quick chat.
Thanks Lee. It seems that it is limited to text areas in nested content and multi mode tree pickets as well both in nested content and in dtge with nested content.
This is in UaaS. Going to run some tests tomorrow to see if it is intermittent. Any ideas?
...and what types of property-editors aren't resolving?
My current project uses some more complex property-editors, which works fine (for us). Of course, I can't offer advice on things I don't know about :-)
Textarea inside an NC, yes ... but the question confuses me, as a textarea typically wouldn't need to be resolved by Courier - there are no IDs that need resolving as GUIDs, nor any dependencies (apart from the textarea DataType - if it's a custom one).
What's the exact issue? Isn't the data being transferred or restored? Does the CourierTraceLog.txt give you any clues?
The main culprits I can see are textarea and multi node tree picker. These are both in scenarios where are using the grid and have a doc type grid editor with a nested content inside the doc type grid editor which has them on.
This is on UaaS though.
I'm trying to figure out if I can notice a pattern and maybe need to run some more tests. Any ideas? It doesn't seem to make much sense.
I'll try and set up a site to demonstrate. You okay if I add you to a dummy UaaS project so you can see what I mean?
Is other content transferring okay? My gut feeling is that something else is at play. We're using this Courier resolver on UaaS and having no issues with DTGE/NC data.
I'd recommend contacting UaaS support on this issue.
I kept getting that error, where there ShouldRun was throwing an exception because the JObject didn't have a value... I thought it was data from other grid cells, but I couldn't figure out how to code a check against it.
This is the code, I ended up doing the evil try/catch.log anti-pattern around it...
But all the ShouldRun is doing is checking if the data-resolver should process. So if the JObject has "dtgeContentTypeAlias" and "value" properties then it should continue the process, otherwise it wont. Courier should still transfer the un-resolved values (to my knowledge).
The source-code is there, might be better to debug against it directly?
I haven't offered a binary distribution of the NestedContent Courier data-resolver, as I felt it would bind me to supporting it - which I'm presently not able to do, sorry.
The source-code is available for a developer to compile it themselves, which means they at least have some level of responsibility in making sure the code works correctly for their own clients/solutions.
My advise would be to contact Umbraco Cloud support team, ask them if they can provide a binary copy of the DLL. They are willing to support popular community packages on Umbraco Cloud.
Thanks for your reply.
I've been in touch with Cloud support and they have been really helpful & patient with me. Dennis kindly helped me out with a copy od the resolver dll.
However I'm still having an issue.
I know you not support the resolver, but can I ask other if they have got DTGE + Nested Content working?
Im having an issue of the field being left empty once transferred over to Umbraco Cloud.
Ive specifically used both packages to create carousel, Using the DTGE for a slide fields, and the Nested Content to repeat the slide. I then have a DTGE to place the carousel in the grid layout.
Courier support for nested content
Hello,
Is there any Courier support for Nested Content? When transferring items with Nested Content fields with document types containing Media Pickers and Content Pickers, the references in those fields are broken.
John
Hi John,
Sorry to say that there currently isn't a Courier data-resolver for Nested Content.
It's on my to-do list, but it's pretty low down - sorry :-(
I'm totally open to help from the community on this. There's an issue on our GitHub with others showing interest, but I haven't heard anything recently:
https://github.com/leekelleher/umbraco-nested-content/issues/11
Thanks,
- Lee
Hi Lee,
Thanks for your reply, that's clear.
Great package, I use it a lot!
Thanks,
John
Hey Lee,
Any news on the Courier support for Nested Content?
Can't wait
Hey JLon,
No news from me, but there is a GitHub repo that has a Courier provider for Nested Content (and DocTypeGridEditor).
https://github.com/display/Umbraco-courier-providers
I haven't tried or tested it though, so I can't vouch for it. If it does work, please do let me know! :-)
I'd still love some community support on this one - it's a pretty heavy burden for a package developer to manage all those scenarios.
Cheers,
- Lee
Hello Lee,
Because of some problems with different assembly versions I copied the code for the NestedContentDataResolverProvider into my project, and had it reference the assemblies I my project. I subsequently had a problem due to DocTypes in the various environments with the same alias but apparently different guids. After changing the code for the DocType lookup to use only the alias it seems to work.
Hi John,
Great to hear that you've got it working! :-)
It think it would be useful for others to post your code-fix somewhere?
Either as a pull-request on their GitHub repo?
https://github.com/display/Umbraco-courier-providers
or if you're unsure about GitHub, etc, then just post it on this thread as a reply?
Cheers,
- Lee
Hi John,
Please can you share your fix?
Many thanks
Bill
Anyone can share the fix on this as well?
Thanks
Hey JLon,
I finally got around to trying out the courier resolver for Nested Content earlier this week. I found a couple of issue with it and fixed accordingly (as all good open-source citizens should do) :-D
I made a fork of the original project, the source-code is here:
https://github.com/leekelleher/umbraco-courier-dataresolvers
I haven't made a package for it yet... so will need Visual Studio to build the code.
I hope this helps?
Cheers,
- Lee
Super sweet Lee,
Helpful as always. I'll download that down.
Do i just need to build the solution and copy the dll to my solution and reference that to work?
Thanks
Yes, build the VS project, copy the
.dll
(and.pdb
if you want debugging info) into your website's /bin folder... and that's it. Courier will pick it up and do the rest.which dll?
nice. thanks Lee
Hi Lee, Some of the guys here have been using nested content inside doc type grid editors in the grid. Looking at this scenario I can't see the data resolver working but can chuck some dev resource at it this week to make a start. If you have any advice or pointers to give them a head start it would be good to have a quick chat.
Hi Mike,
It didn't work, or you think it won't work?
I'm using NCs within DTGEs, which are resolving fine on our environments.
Let me know what's not working, I'm happy to give pointers.
Cheers,
- Lee
Thanks Lee. It seems that it is limited to text areas in nested content and multi mode tree pickets as well both in nested content and in dtge with nested content.
This is in UaaS. Going to run some tests tomorrow to see if it is intermittent. Any ideas?
Hi Mike,
Do you know if the code was compiled from my repo or Dis/Play's repo?
...and what types of property-editors aren't resolving?
My current project uses some more complex property-editors, which works fine (for us). Of course, I can't offer advice on things I don't know about :-)
Cheers,
- Lee
Hi Lee, Sorry - manic week!
The code was pulled from your repo.
The first instance we saw was using a textarea in nested content of a fairly standard document type.
I was going to get one of the guys to run some further tests though outside of UaaS just to see if anything unusual is going on.
A textarea inside nested content should work, right?
Textarea inside an NC, yes ... but the question confuses me, as a textarea typically wouldn't need to be resolved by Courier - there are no IDs that need resolving as GUIDs, nor any dependencies (apart from the textarea DataType - if it's a custom one).
What's the exact issue? Isn't the data being transferred or restored? Does the CourierTraceLog.txt give you any clues?
Hi Lee. No - data is not going over.
The main culprits I can see are textarea and multi node tree picker. These are both in scenarios where are using the grid and have a doc type grid editor with a nested content inside the doc type grid editor which has them on.
This is on UaaS though.
I'm trying to figure out if I can notice a pattern and maybe need to run some more tests. Any ideas? It doesn't seem to make much sense.
I'll try and set up a site to demonstrate. You okay if I add you to a dummy UaaS project so you can see what I mean?
Is other content transferring okay? My gut feeling is that something else is at play. We're using this Courier resolver on UaaS and having no issues with DTGE/NC data.
I'd recommend contacting UaaS support on this issue.
Thanks Lee. Will do once I've managed to figure out a repeatable example.
Thanks again! Will have to buy you a drink at ukfest!
Aha!
Finally found something:
2016-10-06 16:54:37,191 [150] ERROR Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider - [Thread 342] Error reading grid cell value: System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue. at Newtonsoft.Json.Linq.JToken.getItem(Object key) at Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider.ShouldRun(String view, GridValueControlModel cell) 2016-10-06 16:54:37,191 [150] ERROR Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider - [Thread 342] Error reading grid cell value: System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue. at Newtonsoft.Json.Linq.JToken.getItem(Object key) at Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider.ShouldRun(String view, GridValueControlModel cell) 2016-10-06 16:54:37,191 [150] ERROR Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider - [Thread 342] Error reading grid cell value: System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue. at Newtonsoft.Json.Linq.JToken.get_Item(Object key) at Our.Umbraco.Courier.DataResolvers.GridCellDataResolvers.DocTypeGridEditorGridCellResolverProvider.ShouldRun(String view, GridValueControlModel cell)
OK, cool.
I kept getting that error, where there
ShouldRun
was throwing an exception because theJObject
didn't have a value... I thought it was data from other grid cells, but I couldn't figure out how to code a check against it.This is the code, I ended up doing the evil
try/catch.log
anti-pattern around it...https://github.com/leekelleher/umbraco-courier-dataresolvers/blob/develop/src/Our.Umbraco.Courier.DataResolvers/GridCellDataResolvers/DocTypeGridEditorGridCellResolverProvider.cs#L24-L35
But all the
ShouldRun
is doing is checking if the data-resolver should process. So if theJObject
has"dtgeContentTypeAlias"
and"value"
properties then it should continue the process, otherwise it wont. Courier should still transfer the un-resolved values (to my knowledge).The source-code is there, might be better to debug against it directly?
Jumping in here -- I'm getting the same Newton.Json.Linq.JValue error trying to push content from "staging" to "live" on our umbraco sites.
I posted details here and haven't been able to solve the issue.
https://our.umbraco.org/forum/using-umbraco-and-getting-started/80199-error-when-trying-to-transfer-with-courier
Hi all,
Is there an idiots guide to setting up the Umbraco Courier Provider with Nested Content for Umbraco Cloud?
Thanks.
Martin
Hi Martin,
I haven't offered a binary distribution of the NestedContent Courier data-resolver, as I felt it would bind me to supporting it - which I'm presently not able to do, sorry.
The source-code is available for a developer to compile it themselves, which means they at least have some level of responsibility in making sure the code works correctly for their own clients/solutions.
My advise would be to contact Umbraco Cloud support team, ask them if they can provide a binary copy of the DLL. They are willing to support popular community packages on Umbraco Cloud.
I hope this helps?
Cheers,
- Lee
Hi Lee,
Thanks for your reply. I've been in touch with Cloud support and they have been really helpful & patient with me. Dennis kindly helped me out with a copy od the resolver dll. However I'm still having an issue. I know you not support the resolver, but can I ask other if they have got DTGE + Nested Content working?
Im having an issue of the field being left empty once transferred over to Umbraco Cloud.
Ive specifically used both packages to create carousel, Using the DTGE for a slide fields, and the Nested Content to repeat the slide. I then have a DTGE to place the carousel in the grid layout.
Has anyone tried to achieve anything similar?
Thanks
Martin
Hi Martin,
The great news is, since my last reply, Umbraco HQ/Cloud have started a collaboration project to support popular packages...
https://github.com/umbraco/Umbraco.Courier.Contrib
That takes a lot of pressure off me :-)
As for your question about DTGE + NC... that should work (at least I have that scenario working / deploying).
One question is, are you using compositions for the doctypes? As I've heard there might be a bug around that in the resolvers.
Cheers,
- Lee
Hi Lee,
Im not using compositions on the doctypes. I have got it working, local > dev, but only on property editors such as textarea and textstrings.
It seems to fall down when media and the url picker items are involved.
Thats good news about the the resolvers being supported.
Thanks Lee for replying.
Is the Media picker the default Umbraco one? That should work.
With the "url picker" one... is that from a separate package? It's worth checking if that has its own Courier resolver.
(Yep, it starts to get into deeper levels of dependency - the kind of stuff I had a headache to support) :-)
It's worth checking your
config/courier.config
file, to make sure that the property-editor aliases are correct in the<mediaPickers>
section.Cheers,
- Lee
is working on a reply...