Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Dave Reid on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x
Introduced in version:
7.9
Issue links:
Description:
Before Drupal 7.9, an undocumented variable $uri was available to use in node templates. Due to the core bug fix, this variable is no longer available in node templates. This does not affect any core themes.
Before:
//sites/all/themes/mytheme/node.tpl.php:
print $uri['path'];
After:
//sites/all/themes/mytheme/node.tpl.php:
$uri = entity_uri('node', $node);
print $uri['path'];
Impacts:
Site builders, administrators, editors
Themers