Problem/Motivation

PageContext uses an entity but doesn't add the entities cache tags to the render array. This results in inconsistent strange behavior when using gin with gin_toolbar.

We have customizations like published status in the toolbar, which combines with this bug to cause much more confusion for users.

Steps to reproduce

  1. Install a default site with gin and gin_toolbar
  2. Add a page
  3. Edit the page title and save
  4. View the page in the frontend
  5. The page title in the toolbar hasn't updated

Proposed resolution

Add cache tags to the render array

Issue fork drupal-3601289

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

jvollebregt-swis created an issue. See original summary.

jvollebregt-swis’s picture

Status: Active » Needs review

I've added an MR to add the cache tags. This fixes the issue in our production sites and in the blank install

jvollebregt-swis’s picture

StatusFileSize
new612 bytes

Discrete patch for composer extras attached

himynameisseb’s picture

StatusFileSize
new125.3 KB

I'm afriad the fix above didn't work for me.

Clean install of Drupal 11, with default install profile, gin as the admin theme and gin toolbar enabled.

jvollebregt-swis’s picture

You may need to restart your server and clear the drupal cache - opcache prevented the fix from taking for me the first time around