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

  1. On a site with Canvas page regions for the front theme, enable a page layout matching a path.
  2. 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

  1. Kernel test with both subscribers.
  2. Fix.
Command icon 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

mogtofu33 created an issue. See original summary.

  • mogtofu33 committed 77363eaa on 1.0.x
    fix: #3640980 A page layout and the Canvas page regions tie on the page...
mogtofu33’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.