major
nice-to-have
minor
If you configure a view for which layout overlays already exist, conflicts may arise after the layout is exported. For example, if a new tab is created in the administration view and the layout is then exported, restarting the application and logging in again will result in errors due to duplicate component names.
This is because the export always writes template instances of fully expanded layouts to the file system, meaning it specifically includes all changes made to the overlays. If you then restart the application, the overlays are applied to the collected layouts. This results in duplicate components, since the content of the overlays is already present in the exported layout.
Implementation
- Layouts are always exported to the top-level module.
- Overlays are applied only to inherited layouts.
- Overlay files for exported layouts that are located in the same module—i.e., the TopLevel module—are deleted, as they would otherwise be applied and potentially cause the conflicts mentioned above.
- The overlay cache in LayoutStorage must be adjusted or deleted for the exported layouts. Otherwise, upon relogin (without a restart and thus a reset of the overlay cache!), the layout would be rebuilt and the “outdated” overlays would be applied to the “new” layouts.
Test
For example, creating a new tab in the administration interface can be done without errors.