The content is currently stored as json, and there is nothing that updates that json when you edit the definition.
I think you have to make changes to the current data, saving new settings, if you really need it. In any case, you should always write code that can handle something being null.
Often we read settings like:
var settingValue = (Model.Settings as BlockTypeSettings)?.SomeSettingValue ?? "default value";
if(settingValue != null){
// use setting...
}
Previously created content of BlockListItem returns null settings
For BlockListItem, previoulsy created content returns the data of the content but for the settings, it returns null.
If we create new content then it returns proper content and settings data.
It is not feasible to replace every older content with new ones.
Any solution for this issue?
Hi Manish,
The content is currently stored as json, and there is nothing that updates that json when you edit the definition.
I think you have to make changes to the current data, saving new settings, if you really need it. In any case, you should always write code that can handle something being null.
Often we read settings like:
is working on a reply...