I know this doesn't look like it's directly related to the media module, but please hear me out as to why I'm posting this here.

I installed the latest version of the media module which caused havoc with my site (my fault, not yours, I had conflicting versions installed.)

I got loads of these on a page. When I searched it, I came across this article which says that it's precisely what it says in the error, an attempt to flip array keys and values. The value is an array though, so it fails.

To identify where this happens you can search for the following "_load(array"

This was found in line 784 of media.module. Not sure if it's something that will need changing? Hopefully reporting it like this will help track it down though?

Stack overflow article was here ;

http://stackoverflow.com/questions/4798047/array-flipcan-only-flip-strin...

CommentFileSizeAuthor
#3 2098335-media-warning.patch660 bytesnikunjkotecha

Comments

devin carlson’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

I'm not able to reproduce any Warning: array_flip() errors with the latest Media -dev.

I also wasn't able to find any occurrences of explicitly calling a *_load() function with an array.

gngn’s picture

For me the error occured only after clearing the cache.

I found a discussion about checking ids for NULL and added a (core) patch there, which solved my problem:
https://www.drupal.org/node/1003788#comment-9032211

nikunjkotecha’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Status: Closed (cannot reproduce) » Needs work
StatusFileSize
new660 bytes

Issue reproduced and uploading patch

Issue comes when we are using features or some other way to import content type and default value for fid is 0
Since it return is an array it stores as array - $return = array('fid' => 0);

TynanFox’s picture

#3 worked for me, thank you for providing a short, direct, concise answer with patch!

nikunjkotecha’s picture

Status: Needs work » Needs review
chris matthews’s picture

Status: Needs review » Closed (outdated)

Recent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.

Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.

As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.

Thanks,

Media team