Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2006 at 18:25 UTC
Updated:
11 Oct 2006 at 01:44 UTC
When viewing a single node in the node/nodeID page, the function node_view() unsets the teaser. If you try to reload the node using the node_load(nodeID), the node is loaded from the static $nodes array, and you find the teaser unset.
I expected the node_load() to return the full node, I worked it out by returning drupal_clone($nodes[$param]).
You can try this by reloading the node right after the teaser unset, in the node_view() function:
if ($teaser) {
$node->teaser = $content;
unset($node->body);
}
else {
$node->body = $content;
unset($node->teaser);
}
$n = node_load($node->nid);
var_dump($n->teaser);
I get a NULL teaser.
Comments
Comment #1
pwolanin commentedI'll guess you are using PHP 5?
Please look at this post, which includes a patch: http://drupal.org/node/86842
marking as duplicate