- Issue created by @larskleiner
- 🇭🇺Hungary nagy.balint
Hi!
Thanks!
1)
If I understand correctly this can happen if a layout was removed while the module's config still had data for it, and so the update can fail in that case.
Although won't this leave the incorrect config in the module's config intact then?
As the update hooks change structure, but they don't completely replace the full array without the skipped items.2)
Couldn't we use something likeif (!($layoutDefinitions[$lid] instanceof LayoutDefinition)) { continue; }
So the patch is easier to review, and -> https://www.youtube.com/shorts/Zmx0Ou5TNJs
- 🇩🇪Germany larskleiner
1) Both these update hooks are supposed to migrate existing configuration into the new schema after the changes in #3367175, correct?
I would argue you don't need these update hooks as users would likely want to change config after updating this module since there wasn't an option to define limits by region before. Once they changed and re-exported the updated config manually, any old config would be completely replaced anyway.
2) Works for me as long as the database updates go through ok :-)
- 🇦🇹Austria hudri Austria
I would argue you don't need these update hooks as users would likely want to change config after updating this module since there wasn't an option to define limits by region before.
Any change in the config structure should always include an update hook that re-creates the old behavior. If that is not possible, it would need a major version bump.
Posting this here because of #3381902 ✨ Configure disallowed paragraphs per content type Active , which would need an update hook that re-applys all limits to all bundles with layout paragraphs enabled.