Copied to clipboard

Flag this post as spam?

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


  • Olivier Casteleyn 17 posts 121 karma points
    May 03, 2018 @ 08:04
    Olivier Casteleyn
    0

    uSync - Content Picker - Startnode

    Hi,

    I have decided to use uSync for our deployment process (with Octopus).

    I have created a datatype that uses a Content Picker with a startnode. When I export that datatype using uSync I notice that the ID of that startnode is used. ID's of content can be different accross envirnments, so it will not work.

    Should I use a MultiNode picker (Umbraco.MultiNodeTreePicker2) instead (and limit the maximum number of items to 1)? Because you can use a XPath expression to determine the startnode.

    (Umbraco v7)

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 03, 2018 @ 09:20
    Dave Woestenborghs
    101

    Hi Olivier,

    In this case it's better to use MNTP with a Xpath expression. You already figured out why it's not working i see.

    Dave

  • Olivier Casteleyn 17 posts 121 karma points
    May 03, 2018 @ 09:34
    Olivier Casteleyn
    0

    Update: It's not the node ID but the UniqeId that is exported (which is also different if you create the content node on the destination).

    Extra: I've experimented with Courier to transfer the content and then the unique id is preserved, so then the 'Content picker' works fine when transferred to destination.

  • Kevin Jump 2311 posts 14696 karma points MVP 7x c-trib
    May 04, 2018 @ 09:38
    Kevin Jump
    1

    Hi

    yeah just to update uSync doesn't map the UDI values on pickers when you bring content across (i am not sure courier does to - but see that below) - there is an open ticket for this :

    https://github.com/KevinJump/uSync/issues/135

    If you also sync content (for example with uSync.ContentEdition) then this isn't an issue because it will sync the content GUIDs (which form the UID values) so the picker will work on both sides.

    When mapping like this are used (as uSync does for Ids) then it's not 100% because uSync has to go find the content based on it's path and then get the ID - it does work but if there is even a slight diffrence in content trees between the two systems (so spellings, spaces) then it can't find the path and the mapping fails.

    As above personally I tend to fall back to using XPath in MultiNodePickers as its a bit more robust.

    I think courier works because you are also syncing the content when you move it over ? not sure - it might well do the mapping

Please Sign in or register to post replies

Write your reply to:

Draft