Hi I'm trying to walk through the advanced tutorial for adding embedded media content. Invalid argument supplied for foreach() in ../ddblock-cycle-block-content-upright10.tpl.php on line 47. Please see the attached files for the debug info and my template.php file.

Comments

ppblaauw’s picture

StatusFileSize
new10.07 KB

Adjusted your template.php file. (order or if statements). See the attachment.
The debug info looks ok.

Hope this helps you further, please let me know.

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)
ppblaauw’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Set status to closed, assume poster solved the issue, more then 5 weeks no activity.

anriliu’s picture

array (
'delta' => '1',
'output_type' => 'view_fields',
'pager' => 'custom-pager',
'pager_container' => NULL,
'pager_event' => NULL,
'pager_height' => 63,
'pager_width' => 195,
'imgcache_pager_item' => '',
'pager_position' => 'top',
'template' => 'upright50',
'custom_template' => NULL,
'view_name' => 'newview',
)
stdClass::__set_state(array(
'nid' => '14',
'node_title' => 'abd',
'node_language' => '',
'node_data_field_pager_item_text_field_pager_item_text_value' => NULL,
'node_type' => 'ddblock_news_item',
'node_vid' => '15',
'node_data_field_pager_item_text_field_slide_text_value' => NULL,
'node_data_field_pager_item_text_field_image_fid' => NULL,
'node_data_field_pager_item_text_field_image_list' => NULL,
'node_data_field_pager_item_text_field_image_data' => NULL,
'node_revisions_body' => 'asdfasdf',
'node_revisions_format' => '1',
'node_created' => '1303962431',
))

This is my debug info, I really have more than 2 items of ddblock_news_item. So how am I wrong?

ppblaauw’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

#4 can you attach your template.php file.
Maybe the view_name is wrong in the preprocess functions. I see the view used is: 'newview', this is another view then in the examples.

anriliu’s picture

StatusFileSize
new24.86 KB

Please find the template.php in attachment

anriliu’s picture

Resolved, you are right. I have a wrong view name there

ppblaauw’s picture

Status: Postponed (maintainer needs more info) » Fixed

set status to fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.