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