I wanted to start replacing MCW with the group widget in my extensions and I was hoping that the serialized data would be compatible, so that no migration is necessary. Unfortunately there is one tiny difference which breaks the compatibility. This is what a serialized array from MCW looks like for instance:
a:1:{i:0;a:2:{s:6:"format";s:4:"json";s:8:"template";s:28:"nc_fieldset_duplication_json";}}
And this from the group widget:
a:1:{i:1;a:2:{s:6:"format";s:4:"json";s:8:"template";s:28:"nc_fieldset_duplication_json";}}
The key difference is the array index. The array produced by MCW starts with 0 whereas the array produced by the group widget starts at 1 for some reason. The group widget is then not able to load the already existing data because of that.
Is there may be an easy fix without also breaking BC? 🤔 Would be convenient to be able to replace the MCW directly with the group widget, without any migration :)
I wanted to start replacing MCW with the group widget in my extensions and I was hoping that the serialized data would be compatible, so that no migration is necessary. Unfortunately there is one tiny difference which breaks the compatibility. This is what a serialized array from MCW looks like for instance:
And this from the group widget:
The key difference is the array index. The array produced by MCW starts with
0whereas the array produced by the group widget starts at1for some reason. The group widget is then not able to load the already existing data because of that.Is there may be an easy fix without also breaking BC? 🤔 Would be convenient to be able to replace the MCW directly with the group widget, without any migration :)