Problem/Motivation

I think we should be trying to deprecate this rather than using it more widely. Why is it happening in template_preprocess_page() and not node_preprocess_page(), and/or why isn't it generic for entity types - if it's really needed at all. Having said that, maybe we want to commit this and look at it more widely in a different issue.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

lauriii created an issue. See original summary.

lauriii’s picture

A quick fix could be to do the proposal to move the variable from template_preprocess_page to node_preprocess_page. I'm not sure if we should remove this altogether since based on anecdotal evidence, this may be used by many custom themes.

lauriii’s picture

Title: Replace the page.html.twig node variable with something that is aware of other entity types » template_preprocess_page has dependency on node module
Category: Task » Bug report
lauriii’s picture

Title: template_preprocess_page has dependency on node module » template_preprocess_page has a soft dependency on node module
catch’s picture

If we added an entity-agnostic alternative, we could deprecate the node variable (obviously need to have deprecation support for twig variables first).

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.