I have created initial support for the "Multimedia asset" field from the media module. Really simple change. Please review.

Patch to follow.

Comments

Jackinloadup’s picture

Status: Active » Needs review
StatusFileSize
new984 bytes

2 line patch. Please review

jdanthinne’s picture

Status: Needs review » Fixed

Thanks.
Committed to dev.

Jackinloadup’s picture

Status: Fixed » Needs review
StatusFileSize
new803 bytes

In the patch I provided in #1 I included a fix to convert the $items that come from Media into arrays like Core. Now Media is in the process of changing its $items from objects to arrays.

#1005642: $items[$delta] is sometimes an object when Field API requires array. Causes WSOD when previewing multi-valued media field.

When this issue above is closed the patch provided should be applied to get rid of the antiquated code.

jdanthinne’s picture

Ok, committed to dev.

Jackinloadup’s picture

Status: Needs review » Fixed
nfavrod’s picture

Status: Fixed » Needs review

Hi,
I've got the follwind message when I try to add a new node with a multimedia asset field:

Fatal error: Cannot use object of type stdClass as array in /var/www/foo/sites/all/modules/field_slideshow/field_slideshow.module on line 195

I just installed the media module, plus the patch: http://drupal.org/node/1015580#comment-3987098

(Sorry to re-open this topic)

jdanthinne’s picture

Status: Needs review » Active

Was it happening without the patch?
Media is still under beta as well, so every time they change something, it can break compatibility…

Jackinloadup’s picture

jdanthinne’s picture

Status: Active » Fixed

Reverted to DEV.

Status: Fixed » Closed (fixed)

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