Hi folks,
I have CCK installed and am receiving this error:
PHPTemplate was instructed to override the field theme function, but no valid template file was found.
I have the following in the template.php file:
function phptemplate_field(&$node, &$field, &$items, $teaser, $page) {
$variables = array(
'node' => $node,
'field' => $field,
'field_type' => $field['type'],
'field_name' => $field['field_name'],
'label' => $field['widget']['label'],
'items' => $items,
'teaser' => $teaser,
'page' => $page,
);
return _phptemplate_callback('field', $variables, 'field-'. $field['field_name']);
}
Where no white spaces exist after the closing of the ?> tag.
The node file that relies on the template file is called:
node-content_furniture_item.tpl
which the cck content type is:
content_furniture_item
The content shows as it should using this code:
foreach ((array)$field_description as $item) {
print $item['view']
}
So the error in itself is not causing a display issue but just bugs me that I can't fix the error from taking place. For the above example code, there is only one description field but there is a foreach, would that cause such a thing? And, there are other content snippets like:
foreach ((array)$field_price as $item) {
print $item['view']
}