Generated with the help of an LLM.
Problem/Motivation
Selecting a profile on Manage display and saving makes the display render nothing, until someone publishes it in the builder. Every teaser, card or full page using that view mode goes blank on save, listings included.
EntityViewDisplayHook::entityDisplayBuildAlter() replaces the build as soon as the display is enabled, whether or not anything was published. Views displays keep the core render until the first publish.
Steps to reproduce
- On a content type's Manage display, open a view mode used by a listing, select a profile, save.
- View the listing, or render an entity in that view mode: it is empty.
- Publish in the builder: it renders again.
Proposed resolution
Leave the build alone, and the template, while the display has no published sources.
Remaining tasks
- Kernel test rendering an enabled, unpublished display.
- Fix.
Comments
Comment #3
mogtofu33 commentedComment #4
pdureau commentedI have noticed the same yesterday. Thanks you for creating the ticket.
It works well, so RTBC 👍