Closed (fixed)
Project:
Embedded Media Field
Version:
6.x-1.17
Component:
Embedded Audio Field
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2009 at 16:40 UTC
Updated:
3 May 2012 at 09:14 UTC
I used the suggested code from emaudio.theme.inc, but I get I get the following e error when theming node.tpl.php:
Fatal error: Cannot use object of type stdClass as array in /etc/drupal/6/sites/all/modules/emfield/contrib/emaudio/emaudio.module on line 299
My code:
$field_type = 'field_embaudio';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
$field['widget'] = $system_types['content types'][$node->type]['fields'][$field_type]['widget'];
echo theme('emaudio_audio_embed', $field, $node->{$field_type}[$i], 'emaudio_embed', $node);
Comments
Comment #1
gghh2 commentedMy field name is : field_blog_embed_audio
The last line is wrong !!
This line
print theme('emaudio_audio_embed', $field, $node->field_blog_embed_audio[0], 'emaudio_embed', $node);Must be this one :
print theme('emaudio_audio_audio', $field, $node->field_blog_embed_audio[0], 'emaudio_embed', $node);