I'm nut sure what is going on - can someone help or advise please? Thanks
* Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/ribarn01/public_html/includes/entity.inc).
* Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /home/ribarn01/public_html/includes/entity.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1065724-entity-views-invalid-ids.patch | 831 bytes | klausi |
| #6 | 1065724-entity-views-invalid-ids.patch | 767 bytes | klausi |
| #5 | entity-views-invalid-ids.patch | 730 bytes | klausi |
Comments
Comment #1
fagoThis error is not related to the entity API module, but to the core entity API and usually caused by a module calling entity_load() with an integer/string instead of an array for the $id parameter.
Comment #2
mgiffordI ran into the same issue. Any idea about how to go about resolving it? I'm not sure how this module is different than the core entity API.
Comment #3
femrich commentedSeems to be an issue of needing to adapt code from drupal 6 to new requirements of drupal 7. Also seems to be affecting a number of contrib modules. Have yet to see anyone actually fix it. I was given a link to this explanation: http://stackoverflow.com/questions/4798047/array-flipcan-only-flip-strin...
Comment #5
klausiRan into this issue as well, traced it down to EntityFieldHandlerHelper::extract_property_multiple(). If it gets passed some invalid/stale wrappers it calls entity_load() incorrectly with FALSE values. Yes, there might be another problem going on here, but the entity API should also make sure to call other functions correctly. Encountered this problem with the search_api Views integration, re-Indexing all entites helped.
Patch attached.
Comment #6
klausiWhoops, of course that other line needs to be removed.
Comment #7
klausiNew patch with a longer comment. I debugged this issue and it occurred on empty field collection fields, where the entity value is NULL (field collection does not exist) and therefore the id is returned as FALSE.
Comment #8
fagoThanks, looks good to me. Committed.