Closed roryaherne closed 1 year ago
@roryaherne can you tell me what you have for the Configuration of that widget?
The logic should ignore any null/whitespace value when parsing the content, but your configuration can override the value, so if you have a null in the configuration it may be killing it.
and by Configuration i mean the JSON structure that tells the tool how to map your widget from portal to page builder.
Hi Trever, here you go:
{
"Key": "SelectTopN",
"Value": "",
"DefaultValue": null,
"OutKey": "INHERIT",
"CanContainInlineWidgets": false,
"InlineWidgetMode": "ADDAFTER"
},
It looks like the default value was empty in kentico 12. For this instance it will make sense for me to give a default value of -1 but I can imagine other widgets whereby behaviour of the widget could vary based on a null value. But perhaps for ints that default value should be 0.
Edit: Also have the issue for a DateTime field:
{
"Key": "StartDate",
"Value": "",
"DefaultValue": null,
"OutKey": "INHERIT",
"CanContainInlineWidgets": false,
"InlineWidgetMode": "ADDAFTER"
},
It should handle this... Before I continue, can you check to make sure all the nuget packages are updated? The current logic looks fine, we have similar I think and no issue that I'm aware of, but maybe it is non string things it doesn't handle well...
I haven't used this since KX12To13Converter.Base v12.29.16 back in September/October so it might have been fixed since then. I'll try another import when I get the chance and keep you updated. It probably won't be until some stage in the new year though unfortunately.
Feel free to delete this in the meantime and I can recreate it if the issue persists.
No need to delete this, it may be an issue. Pro tip though, you can uninstall the base package and just include the actual project from this repo (update the xperience library package on it too match your project hotfix version), and you can debug it and see what may be the exact spot.
Hi Trevor, sorry for the late reply. I upgraded to 12.29.17 and that seems to have done the trick. Cheers, Rory
In the column [CMS_Document].[DocumentPageBuilderWidgets], widgets with properties with a null value can cause parsing errors: