Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
5.x-1.3
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2007 at 14:18 UTC
Updated:
11 May 2007 at 12:24 UTC
Running Drupal 5.1
CCK 5.x-1.3
MySQL 5 (running in MSQL40 mode)
PhP5
IIS6
I'm getting "warning: Invalid argument supplied for foreach() in ..\MyTheme\node-test.tpl.php on line 10.
I copied the content of \modules\cck\theme\template.php (1 function) in my theme's template.php file.
When I try to return just one (custom) field value, it doesn't return anything. When I try to make use of the foreach loop supplied in node-test.tpl.php (test being the name of my custom content type) , I get the warning, and no value is being returned to the page.
Thanks
Charles
Comments
Comment #1
yched commentedthe cck template.php function only comes into play if you use field-specific templates (field.tpl.php), but is out of the loop for node templates.
You should probably post the content of your node-test.tpl.php file.
Comment #2
forgestik commentedAll right. First, here's what I get when I run the function allowing me to list all the available variables...
Comment #3
forgestik commentedWhen running the code below, I'm getting no result, but no warning message
Comment #4
forgestik commentedAnd finally, this loop below is returning a warning message (see title of this issue) and no results.
Comment #5
yched commentedclosing support request - please reopen if needed
Comment #6
killes@www.drop.org commented