Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James 12 posts 83 karma points
    Feb 15, 2017 @ 01:41
    James
    1

    How do I configure data resolvers?

    Looking for some help on how to configure and use the extra data resolvers in Umbraco Courier Contrib for Leblender grid editors. I'm on Umbraco 7.5.2 and latest Courier 3.0.4.

    I've got a Leblender grid editor that has a media picker, and predictably Courier does not pick up the image in that editor and transfer it when deploying. I've installed the latest Courier Contrib package, but have no idea how to use it.

    I assume I've got to add some entries in the itemDataResolvers/mediaPickers section of the courier.config file, but don't understand how to identify Leblender-based editors here:

    <mediaPickers>
      <!-- add new datatype elements for data types that stores media ids (ex: "1242" or "1726,2362,2323") -->
      <add key="multiplemediaPicker">Umbraco.MultipleMediaPicker</add>
      <add key="mediaPicker">Umbraco.MediaPicker</add>
      <add key="MNTP-CSV">Umbraco.MultiNodeTreePicker</add>
    </mediaPickers>
    

    I've tried banging rocks together by sticking in the alias of my custom grid editor in various permutations along with the alias of its media picker property and the Umbraco.MediaPicker alias as well even. I restart the app pool after each change to the config file to make sure it gets picked up.

    I get no errors on deploy, it just doesn't find any of the images to deploy from these editors.

    Could anyone give me an example for how to use the Leblender resolvers (or really any Courier data resolvers!) in the Courier Contrib package properly please?

    Thanks!

    ~James

  • Mark Bowser 261 posts 846 karma points c-trib
    Feb 15, 2017 @ 20:38
    Mark Bowser
    0

    I don't think adding it to the mediaPickers will work. I think that section is for property editors that store their data as either an int or a comma-separated list of ints. The grid stores its data as JSON. I'm pretty sure that you don't actually need to add anything to the courier.config file. Just making sure that the data resolver dlls are in the bin should be enough. Those sections in the config are for configuring some more generic data resolvers that are built into courier. You can register data types to be picked up and handled by those data resolvers. For instance, If I wanted to build a really neat MNTP for myself with a unique UI, I would want to store the data as a comma-separated list of ints. Then, instead of writing a whole custom data resolver for my new MNTP, I could just register it in the courier.config contentPickers section.

    Have you tried installing the Courier Contrib but not adding leblender to the courier.config file? I just checked on a project where we have a custom courier data resolver for the v7 Mentor Web Blocks. I can confirm that we just had to add the dll to the bin. No configuration in the courier.config necessary.

    By the way, thanks for pointing out the courier contrib for me. I didn't know that it existed! I'm excited to use those data resolvers.

  • James 12 posts 83 karma points
    Feb 15, 2017 @ 22:37
    James
    0

    Thanks for replying. I had tried initially with just adding the Contrib package and leaving courier.config alone, but no luck.

    I believe the trouble is my Grid Editor I made using LeBlender is storing the whole editor's contents as a JSON blob containing the ID of the media selected from its media picker. Courier (even with Contrib installed) isn't noticing and resolving that ID so it doesn't deploy the image file and on the other end I just have a broken media picker pointing to an ID that doesn't exist in that system.

    This thread seems to indicate that entries had to be added to the config file to enable Nupickers to function:

    https://our.umbraco.org/forum/umbraco-courier/76955-nupickers-not-transferring-by-courier-and-no-error-log-generated

    So I figured Leblender must also need something similar. But all my attempts so far have not been successful.

  • Mark Bowser 261 posts 846 karma points c-trib
    Feb 17, 2017 @ 16:20
    Mark Bowser
    0

    Hmmmm. It is a good try, but the reason you add the config for the nuPicker is that the nuPickers doesn't need its own data resolver because I believe it is just storing the data as an int or as a list of ints. Because of that, it can opt in to be picked up by the content picker data resolver built into Courier by using that config. If I'm right, there isn't any built in data resolver that you can opt into that will work for the grid or leblender.

    Is there a way that you can verify that any of the other data resolvers in the contrib package are working for you? Do you have NestedContent that you can try to courier or maybe the DocType Grid Editor? I'd like to rule out that there is something wrong with the courier contrib or the way it is integrating with your site. This would help with that. Unfortunately, now is not a good time for me to actually test this myself. I am really curious about this, so if I get enough of a free moment, I'll definitely try it on one of our sites and let you know what happens.

    Anyone else had any success couriering LeBlender yet?

Please Sign in or register to post replies

Write your reply to:

Draft