Copied to clipboard

Flag this post as spam?

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


  • Ryan Casey 10 posts 103 karma points
    Nov 12, 2018 @ 21:15
    Ryan Casey
    1

    Multiple Content Picker Macro Parameter Not Resolving in Courier

    I have a macro with a single parameter field of the Multiple Content Picker type.

    After I sync between environments via Courier, if any of the ID's of the selected items are different between environments, the macro doesn't display the items correctly. The IDs aren't resolving properly, as they would (and do, I've tested) if I used the plain Content Picker macro parameter type.

    So, I've ensured that both macrosAreDependencies and macroParametersAreDependencies are true in my courier.config, and I also checked the macroPropertyTypeResolvers section of courier.config. It is as follows:

    <macroPropertyTypeResolvers>
    <contentPickers>
      <!-- Macro Property Types, that store Content IDs, to link to media or content -->
      <add key="contentPicker">Umbraco.ContentPickerAlias</add>
      <add key="contentPicker2">Umbraco.ContentPicker2</add>
      <add key="multiplemediaPicker">Umbraco.MultipleMediaPicker</add>
      <add key="mediaPicker">Umbraco.MediaPicker</add>
      <add key="mediaPicker2">Umbraco.MediaPicker2</add>
      <add key="MNTP-CSV">Umbraco.MultiNodeTreePicker</add>
    </contentPickers>
    

    As you can see, I have added the MultiNodeTreePicker to this section, but it's still not resolving.

    Am I missing something here? Any help would be appreciated.

  • Ryan Casey 10 posts 103 karma points
    Dec 10, 2018 @ 18:53
    Ryan Casey
    0

    Going to give this as a bump. I have since narrowed this down to being an issue when using the following line in contentPickers

      <add key="MNTP-CSV">Umbraco.MultiNodeTreePicker</add>
    

    If I have that as a field type for a macro, Courier gives a 500 error with no visible stack trace to help out as it tries to resolve items selected.

    Any ideas as to next steps to diagnose this?

  • Ryan Casey 10 posts 103 karma points
    Dec 10, 2018 @ 19:21
    Ryan Casey
    1

    To add a bit more context, I found the following in the Courier log file after turning on debugging.

        System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Could not proceed, no content type found with alias USNBlogPost
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
       at Umbraco.Courier.RepositoryProviders.WebServiceProvider.RepositoryWebservice.EndGetHashes(IAsyncResult asyncResult)
       at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.GetHashes(ItemIdentifier[] itemIds)
       at Umbraco.Courier.Core.Packaging.RevisionPackaging.GetTargetHashes(IPackagingTarget2 target, IEnumerable`1 ids)
       at Umbraco.Courier.Core.Packaging.RevisionPackaging.PackageBatch()
       at Umbraco.Courier.Core.Packaging.RevisionPackaging.Package()
       at Umbraco.Courier.Core.Tasks.PackagingTask.Run()
       at Umbraco.Courier.Core.BackgroundTaskRunner`1.ConsumeTaskInternal(T task)
    

    So the issue seems to be that Courier can't find the USNBlogPost type, but I have checked and that it exists as a document type on both environments.

    Further, I added a parameter to my macro using a plain Content Picker and picked a document of the USNBlogPost type that didn't exist on the target, and that resolved just fine, so Courier is apparently able to handle that document type fine.

  • Ben Duguid 12 posts 85 karma points
    Jun 17, 2019 @ 09:42
    Ben Duguid
    0

    Having the same problem here with macros using document types with Multi-node Content Tree pickers - I'm assuming you've not managed to resolve this one yet?

  • Ryan Casey 10 posts 103 karma points
    Jun 17, 2019 @ 11:49
    Ryan Casey
    1

    Unfortunately I never was able to find a solution or a way to make Courier play nice with the Multi-Node Tree Picker, I ended up splitting the single field into 4 individual content pickers in this case.

    I know that's not a real solution to the problem all in all, but it at least allowed the client to do what they needed to do in that case.

  • Ben Duguid 12 posts 85 karma points
    Jun 17, 2019 @ 13:06
    Ben Duguid
    0

    Thanks for coming back - I fear that's probably the case here as well.

    Digging a lot deeper, I can see that Courier seems to be trying to resolve the content items as "media" rather than content, and even though it successfully retrieves the content item from the database, it fails to find the correct ContentType for the item because it can't seem to create an ItemIdentifier.

    Seeing as Umbraco have removed the "lite" version of Courier, I'm hoping I'll be able to get some more tangible support for this from them.

  • Ben Duguid 12 posts 85 karma points
    Jun 17, 2019 @ 13:30
    Ben Duguid
    1

    Rather interestingly I've found Umbraco.MultiNodeTreePicker2 as a potential content provider, and using that seems to send it as a Document rather than Media item, which seems to help:

    <macroPropertyTypeResolvers>
      <contentPickers>
        <!-- Macro Property Types, that store Content IDs, to link to media or content -->
        <add key="contentPicker">Umbraco.ContentPickerAlias</add>
        <add key="multiplemediaPicker">Umbraco.MultipleMediaPicker</add>
        <add key="mediaPicker">Umbraco.MediaPicker</add>
        <!-- Add this using alias "2" if linking to Content rather than Media -->
        <add key="MNTP2-CSV">Umbraco.MultiNodeTreePicker2</add>
      </contentPickers>
    </macroPropertyTypeResolvers>
    
  • Ryan Casey 10 posts 103 karma points
    Jun 17, 2019 @ 13:32
    Ryan Casey
    0

    I had tried that as well and it still wasn't enough to fully resolve on my end, but please let me know if you have better luck.

  • Ben Duguid 12 posts 85 karma points
    Jun 17, 2019 @ 13:40
    Ben Duguid
    0

    Hmm, ok, I'll hold back on my excitement and promises then ;)

  • Ben Duguid 12 posts 85 karma points
    Jun 18, 2019 @ 08:41
    Ben Duguid
    2

    Yep, that didn't work. I've reached out to support who've confirmed that it appears to be a bug.

    I've raised the following issue:

    https://github.com/umbraco/Umbraco.Courier.Issues/issues/10

Please Sign in or register to post replies

Write your reply to:

Draft