Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293349

template_preprocess_node() does not add cacheability metadata

$
0
0

Problem/Motivation

  // The 'page' variable is set to TRUE in two occasions:
  //   - The view mode is 'full' and we are on the 'node.view' route.
  //   - The node is in preview and view mode is either 'full' or 'default'.
  $variables ['page'] = ($variables ['view_mode'] == 'full'&& (node_is_page($node)) || (isset($node->in_preview) && in_array($node->preview_view_mode, array('full', 'default'))));

node_is_page() looks like this:
https://api.drupal.org/api/drupal/core%21modules%21node%21node.module/fu...

So it should add the route context.

And also $node->in_preview - this probably needs a cache context too.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 293349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>