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.
I was out few days and when I came back and opened my test site, I got the following error:
Notice: Trying to get property of non-object in node_page_title() (line 2200 of /var/www/oatrium/modules/node/node.module).
As a side effect, the top bar menu entries are empty (see the screenshot: error_in_node_page_title.png)
To solve this problem, I change this code:
function node_page_title($node) {
return $node->title;
}
into this code
function node_page_title($node) {
if (is_numeric($node)) {
$node = node_load($node);
}
return $node->title;
}
After the correction, the top bar menu is showing the links (see the screenshot: no_more_issue_after_the_change_in_node_page_title.png)
Of course, changing a core drupal file is not the right way to solve this issue...
Comment | File | Size | Author |
---|---|---|---|
no_more_issue_after_the_change_in_node_page_title.png | 8.04 KB | DuneBL | |
error_in_node_page_title.png | 13.19 KB | DuneBL |
Comments
Comment #2
SaintNexcis CreditAttribution: SaintNexcis commentedThis is still an issue... with Drupal 7.54
Comment #3
mpotter CreditAttribution: mpotter at Phase2 commentedYou need to post steps for reproducing this on a clean Atrium site (like a Pantheon install). I have not seen this and certainly patching core is not a good solution. It's more likely a problem in another module or in the specific content on your site somehow.
Comment #4
Stephen OllmanI suspect that this is not an Open Atrium issue as I'm getting the same error on a normal D7.64 site.