Generated with the help of an LLM.
Problem/Motivation
On a site with Canvas, Display Builder's PageVariantSubscriber and Canvas's PageVariantSelectorSubscriber both listen to RenderEvents::SELECT_PAGE_DISPLAY_VARIANT at priority -100. Neither stops propagation, and the last one to call setPluginId() wins.
So whether an enabled page layout or the Canvas page regions render a page depends on module order, which nobody chooses.
Steps to reproduce
- On a site with Canvas page regions for the front theme, enable a page layout matching a path.
- Visit that path: the page layout or the Canvas regions render, depending on which module's subscriber was registered last.
Proposed resolution
Move PageVariantSubscriber to -105: it runs after Canvas, so a page layout the user enabled wins over Canvas regions. Canvas headless's preview, at -110, still wins over both.
Remaining tasks
- Kernel test with both subscribers.
- Fix.
Issue fork display_builder-3640980
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 commented