Copied to clipboard

Flag this post as spam?

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


  • Tito 314 posts 623 karma points
    Sep 19, 2016 @ 17:35
    Tito
    0

    Fails getting Checkbox list values from nested content

    Hi, i am using nested content and its working well, but i think i have found a bug. In my nested document type i have a checkbox list property. It renders ok in the backoffice with the values checked but when i am getting the IPublishedContents it has no value in that property.

    var discounts= objUmb.GetPropertyValue<List<IPublishedContent>>("discounts");
    
    foreach(var item in discounts){
    //It gets the value ok
      var discount = item.GetPropertyValue<decimal>("discount ");
    //This is the checkbox list property It gests empty but in the backoffice it shows the items checked
      var paymethods= item.GetPropertyValue<string>("paymethods");
    //It gets false
      bool hasPaymethods = item.HasValue("paymethods");
    }
    

    I have tried to change the property type to textstring and it works

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Sep 19, 2016 @ 17:58
    Lee Kelleher
    0

    Hi Tito,

    Unfortunately, it's a known issue with using the native CheckboxList within a Nested Content. Currently there isn't a workaround.

    Sorry it isn't better news.

    Cheers,
    - Lee

  • Tito 314 posts 623 karma points
    Sep 20, 2016 @ 08:15
    Tito
    0

    Thanks lee, do you know if it is going to be fixed soon? if not i could use a multi content picker for this. Its weird, why it works on the backoffice and not in the front?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Sep 20, 2016 @ 08:49
    Lee Kelleher
    0

    Hi Tito,

    To set your expectations, I'm not actively looking into a fix for this. (Due to my work/family/life/other commitments).

    I believe the cause of the issue is with how the native CheckboxList is doing something funky with saving the data. But I haven't dug deeper into the reason why.

    I'm totally open for any to submit a patch for it. Maybe rally up support for it on Twitter? :-)

    Cheers,
    - Lee

  • Tito 314 posts 623 karma points
    Sep 20, 2016 @ 09:26
    Tito
    0

    Thanks Lee, i have go through it changing the type to multi node tree picker and creating the prevalues as content items. For me its better this way as i have to relate this items with other content. In a future a will take into account that "special types", thank you very much for this great package!

  • John Seto 37 posts 98 karma points
    Oct 05, 2016 @ 17:58
    John Seto
    1

    Thanks, good to know I'm not going mad.

    FYI: Dropdown List Multiple doesn't work either.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 06, 2016 @ 08:43
    Lee Kelleher
    0

    Thanks John, I'll add it to the list!

    Cheers,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft