Copied to clipboard

Flag this post as spam?

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


  • Mark Bowser 273 posts 860 karma points c-trib
    Sep 26, 2017 @ 20:41
    Mark Bowser
    0

    RadioButtonList values prefixed with null on deploy

    I'm using:

    • Umbraco 7.4.3
    • LeBlender 1.0.8.4
    • Courier 3.1.4
    • Umbraco.Courier.Contrib 1.0.39

    I have a document type using the grid. There is a LeBlender grid editor I created with a RadioButtonList on it. When I deploy pages using that grid and that RadioButtonList grid editor, courier fails to correctly deploy. The problem is in the packaging. If I inspect the actual revisions JSON, this is a snippet of the grid JSON that has my RadioButtonList:

    "alignText":{"value":"nullLeft","dataTypeGuid":"f18471be-499a-44e8-a1d8-f075d8e1b736","editorAlias":"alignText","editorName":"Align Text"}
    

    Notice that the value is nullLeft. I decompiled the Umbraco.Courier.DataResolvers.dll and looked at the Umbraco.Courier.DataResolvers.ItemDataResolvers.KeyValuePrevalueEditor DataResolver class that handles packaging and extracting for the RadioButtonList and noticed that for whatever reason, Courier explicitly adds the ¤ symbol to the beginning of the value when packaging this data type.

    contentProperty.Value = (object) str2.TrimEnd(';').EnsureStartsWith('¤');
    

    If that symbol is not found at the beginning of the value when extracting, Courier will skip any special extraction logic and just leave the value plain text.

    if (str1.StartsWith("¤"))
    {
        ...
    }
    

    The problem appears to be that Courier takes that special ¤ character and writes it out as the string, "null", when it actually packages my revision. In my case, when my revision JSON should have had ¤Left, it had nullLeft. I did a bunch of debugging of the Umbraco.Courier.Contrib DataResolvers that I am using to handle the packaging and extraction of LeBlender. The problem doesn't seem to happen in there. I stepped through the packaging process, and by the time I exited the PackagingCell method, the special ¤ character was still there. I'm pretty sure that this is a problem with Courier itself.

    Has anyone else run into this problem? Am I doing something wrong? Thanks

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Sep 27, 2017 @ 14:56
    Paul Sterling
    0

    Mark -

    Mostly adding this for others who run into this issue with Courier 3.1.4. It looks like a regression bug introduced in 3.1.4 and with a fix targeted for 3.1.5.

    The related issue on the tracker is: http://issues.umbraco.org/issue/COU-626

    Note that this issue appears to be related to any key-value pair data type when used in a Grid (Grid, LeBlender, etc...).

    Cheers!

Please Sign in or register to post replies

Write your reply to:

Draft