- Issue created by @wim leers
- 🇬🇧United Kingdom catch
Deleted regions with block content configured is tricky. However a good first step here would be being able to 'clean up' a page template config entity where regions were previously FALSE (nothing configured for them) but now don't exist. I can see this happening when people are XB-ifying their own sites and trying to clean up/simplify their theme as a result.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
📌 Introduce an XB `PageTemplate` config entity Active is in!
(Also, thanks, @catch, and sorry for not crediting you in the first place 🙈)
- 🇬🇧United Kingdom catch
So one option - when saving an entity, automatically remove FALSE regions that don't exist any more in the theme info?
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Yes, we could do that.
But I think @lauriii is stating that there should be no interaction required from any user at all; only the act of updating a theme (to have added or deleted regions) should automatically update the affected
PageTemplate
config entity, if any.P.S.:
NULL
regions BTW, notFALSE
, because:# A region that is left empty may be `null`. nullable: true # All non-empty regions must have a component tree defined. type: experience_builder.component_tree
- 🇬🇧United Kingdom catch
Ah OK makes sense with NULL, so NULL to non-existent then :P
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Yep! :D I felt weird even pointing that out, because it felt like absurd nitpickery — but it actually meant something different so I decided to post it anyway 😅