system_page_attachments() varies by authenticated user role but does not add said cache context

Created on 4 August 2023, over 1 year ago
Updated 22 January 2024, 11 months ago

Problem/Motivation

Discovered here: #3376846-12: Implement the new access policy API β†’

Core never adds Drupal settings to the page in system_page_attachments() if the account isn't logged in. We never added a cache context to reflect that, leading to incorrect cache entries where Drupal settings either is present when it shouldn't be or vice versa. This problem almost never shows on real websites because most themes add more JavaScript, but Stark does not and most tests run using Stark.

Steps to reproduce

Proposed resolution

Proposed solution is to add user.roles:authenticated to system_page_attachments() and adjust existing tests.

Remaining tasks

Review

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
BaseΒ  β†’

Last updated about 23 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium kristiaanvandeneynde Antwerp, Belgium

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024