Problem/Motivation
Follow-ups from a review of how the submodules touch the theme registry, after #3631924: Views and the page_layout source invalidate the runtime theme registry cache.
The views suggestion alter claims to run last but has no order, so a later module alter can still add a winning suggestion.
Two deliberate choices carry no comment, which invites a well-meant "fix": the render-free window around the theme switch in BuilderDataConverter::convertPage(), and the fixed preprocess list of the entity __display_builder registry entries.
Proposed resolution
Add order: Order::Last to #[Hook('theme_suggestions_views_view_alter')], as TemplateOverride::suggestionsAlter() already does.
In convertPage(), say nothing may render or collect assets between the two setActiveTheme() calls: LibraryDiscoveryCollector memoizes its cache ID from the active theme on first use.
In TemplateOverride::themeRegistryAlter(), say the entity type and module or theme preprocess hooks are skipped on purpose, and what is lost: attributes, contextual links and libraries added there.
Remaining tasks
- Apply the three changes.
- Check
DisplayExtenderTeststays green.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork display_builder-3631942
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mogtofu33 commentedComment #6
pdureau commented