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...
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2098335-media-warning.patch | 660 bytes | nikunjkotecha |
Comments
Comment #1
devin carlson commentedI'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.Comment #2
gngn commentedFor 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
Comment #3
nikunjkotechaIssue 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);
Comment #4
TynanFox commented#3 worked for me, thank you for providing a short, direct, concise answer with patch!
Comment #5
nikunjkotechaComment #6
chris matthews commentedRecent 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