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
Steps to reproduce
- Apply the patch https://www.drupal.org/project/drupal/issues/2511548#comment-15429828 or any newer.
- Go to the "patterns" overview page.
We get a PHP Fatal error.
Proposed resolution
Maybe create the context object inside the "ui_patterns_theme_suggestions_alter()" function, but not before?
Comments
Comment #2
nicolas-lsn commentedComment #3
pdureau commentedFor information,
#contextproperty will not be kept in UI Patterns 2.x because it is used mainly for preprocesses hooks which are forbidden by SDC.Comment #4
pdureau commentedIs it OK Nicolas?
Comment #5
pdureau commented