Getting this error on a frontpage made with panels and views, including multiple filefields (both hidden and viewable).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 177 of /home/www/new.medmesh.org/includes/entity.inc).

When I hide the panel view containting above the error does not show. However after reading something about cache settings I activated the view's cache and the message disappear.

It applies also to the 7.x.beta3 version, and "upgrade" to dev (27 april) did not have immidiate effect.

I also had suspicious towards token module and pathauto because it appeared after theses where activaded, but even without theses modules the error persisted.

Line 177 in entity.inc referrres to this code and text:
// Create a new variable which is either a prepared version of the $ids
// array for later comparison with the entity cache, or FALSE if no $ids
// were passed. The $ids array is reduced as items are loaded from cache,
// and we need to know if it's empty for this reason to avoid querying the
// database when all requested entities are loaded from cache.
Line 177--> $passed_ids = !empty($ids) ? array_flip($ids) : FALSE;
// Try to load entities from the static cache, if the entity type supports
// static caching.

My conclution is that something is faulty in the way views handles/showing the view in a non-cached mode in conbination with multiple fields (hidden ones)! Hope the community can look into this in a more qualified way that I can.

Thanks

Comments

merlinofchaos’s picture

Can you export and attach the panel and the view?

There was a known bug with an argument in panels that could cause this, but I have no idea how you've got it configured.

If the export doesn't tell us much, we may need you to put a backtrace debug in the code there. If it comes to that we can tell you how to do it.

plastikkposen’s picture

StatusFileSize
new2.6 KB
new12.6 KB

Hi

Exports in files.

The error is now back, but very irregular fashion.

Thanks for looking into it.

plastikkposen’s picture

Status: Fixed » Active

Update: Did a clean install, and the error occur again. My problem is caused by error in the Filefield Sources module that was enabled (but later disabled) in the installation this post referres to.
See solution/patch about this here: http://drupal.org/node/1137850

plastikkposen’s picture

Status: Active » Fixed

See post #3 above

quicksketch’s picture

Category: bug » support
Status: Active » Closed (duplicate)