The #context object may cause issue in the future

Created on 21 February 2024, 9 months ago
Updated 31 July 2024, 4 months ago

Problem/Motivation

The UI Patterns module adds a #context object to the template variables. But this can cause issue in the future, as it is possible that Drupal Core defines itself a #context array.

@see https://www.drupal.org/project/drupal/issues/2511548#comment-15457093 Add a "context" array variable to all theme hooks and "#context" array property to all elements to provide optional contextual data Needs work

Steps to reproduce

We get a PHP Fatal error.

Proposed resolution

Maybe create the context object inside the "ui_patterns_theme_suggestions_alter()" function, but not before?

💬 Support request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇫🇷France nicolas-lsn

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

Comments & Activities

Production build 0.71.5 2024