In my D7 site, I have a content type that's being displayed using Content Template (Contemplate). The Content Template code hasn't changed in over a year. It's been running like a champ… displaying new content and edited content on hundreds of nodes.
All of a sudden, no new node content will be displayed through Content Template. If I temporarily disable the Content Template, the node content will appear. When I turn it back on, nothing.
I wiped out my Content Template code thinking there might be some conflict in there. I replaced the whole thing with just one line:
<?php print $node->field_body[$node->language]['safe_value']; ?>
What's interesting is that any HTML or PHP in the Content Template code will still work… it's just the field variables that are not producing any values. And again, this is only for newly created nodes.
Some of the core node variables will still work (like NID and Title), but none of the custom fields. So, for example, this code works:
<p>node: <?php print $node->nid ?></p> <p>title: <?php print $node->title ?></p>
This would produce the NID and the node title successfully on the page. But, the aforementioned
$node->field_body… (which is a custom field), produces nothing.