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.
API page: https://api.drupal.org/api/drupal/modules!node!node.module/function/node...
Enter a descriptive title (above) relating to function node_uri, then describe the problem you have found:
Since updating to D7 - v7.35 - receiving the following error: Notice: Undefined property: stdClass::$nid in node_uri() (line 251 of /modules/node/node.module).
The code on line 251:
/**
* Implements callback_entity_info_uri().
*/
function node_uri($node) {
return array(
'path' => 'node/' . $node->nid,
);
}
This is confusing as callback_entity_info_uri() looks like this:
function callback_entity_info_uri($entity) {
return array(
'path' => 'node/' . $entity->nid,
);
}
This error causes an issue when manipulating calendar views.
System particulars:
Drupal 7.35
PHP: 5.6.5
OS: CentOS 6.5
Views: 7.x-3.10
Comments
Comment #1
kenorb CreditAttribution: kenorb commented#2457453: Error: Notice: Undefined property: stdClass::$nid in node_uri()