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
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?
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? :-)
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!
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.
I have tried to change the property type to textstring and it works
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
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?
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
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!
Thanks, good to know I'm not going mad.
FYI: Dropdown List Multiple doesn't work either.
Thanks John, I'll add it to the list!
Cheers,
- Lee
is working on a reply...