Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
can anyone confirm this log entry/error?
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityCacheControllerHelper::entityCacheLoad() (Zeile 69 von /var/www/test/sites/all/modules/contrib/entitycache/entitycache.module).
Comment | File | Size | Author |
---|---|---|---|
#13 | entitycache-oneliner-1695918-13.patch | 737 bytes | holtzermann17 |
#7 | entitycache.1795918.patch | 648 bytes | phayes |
Comments
Comment #1
jpstrikesback CreditAttribution: jpstrikesback commentedI'm seeing this when I delete certain video file items from a node, here is the trace:
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 355 of /srv/bindings/blah/code/includes/entity.inc). Backtrace:
array_flip(Array) entity.inc:355
DrupalDefaultEntityController->cacheGet(Array, Array) entitycache.module:68
EntityCacheControllerHelper::entityCacheLoad(Object, Array, Array) entitycache.module:199
EntityCacheNodeController->load(Array, Array) common.inc:7729
entity_load('node', Array, Array, ) node.module:909
node_load_multiple(Array) views_plugin_row_node_view.inc:98
views_plugin_row_node_view->pre_render(Array) views_plugin_style.inc:307
views_plugin_style->pre_render(Array) view.inc:1236
view->render() views_plugin_display_block.inc:54
views_plugin_display_block->execute() view.inc:1337
view->execute_display('block_1') views.module:703
views_block_view('some_listing_videos-block_1')
call_user_func_array('views_block_view', Array) module.inc:833
module_invoke('views', 'block_view', 'some_listing_videos-block_1') block.module:854
_block_render_blocks(Array) context_reaction_block.inc:392
context_reaction_block->block_list('page_top') context_reaction_block.inc:354
context_reaction_block->block_get_blocks_by_region('page_top') context_reaction_block.inc:223
context_reaction_block->execute(Array) context.core.inc:258
context_page_build(Array) common.inc:5704
drupal_render_page(Array) common.inc:2656
drupal_deliver_html_page(Array) common.inc:2544
drupal_deliver_page(Array, '') menu.inc:532
menu_execute_active_handler() index.php:21
In my case this was to do with the Video module and how it was using drupal_write_record I believe. It is fixed now i believe by Video using file_save. Interestingly the items that were saved to the node via entity refs before the fix are still affected...even after deleting them...
Comment #2
kaizerking CreditAttribution: kaizerking commentedsame error here too
Comment #3
jpstrikesback CreditAttribution: jpstrikesback commentedKaizerking, I was looking at this again on Friday and noticed that in my view it was outputting a node created timestamp, and two empty reference fields, thus sending Entity Cache a NULL value to array_flip on, I'll be digging more today or tmrw, but I'm just wondering, are you seeing this in conjunction with a view?
Comment #4
kaizerking CreditAttribution: kaizerking commentedjpstrikesback, I am getting this error on enabling the module,
So I am not sure what is triggering this
Comment #5
j0rd CreditAttribution: j0rd commented@jpstrikesback for me I'm getting it from an ajax call. I don't believe it's got a view.
Comment #6
j0rd CreditAttribution: j0rd commented#1508612: Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! #3
Might be a response.
Comment #7
phayes CreditAttribution: phayes commentedAttached is a patch that fixes this.
Comment #9
phayes CreditAttribution: phayes commentedTest failed because of unrelated problem:
Fatal error: Class 'NodeAccessRecordsUnitTest' not found in /var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/entitycache/entitycache.test on line 261].
Comment #10
jpstrikesback CreditAttribution: jpstrikesback commented#7: entitycache.1795918.patch queued for re-testing.
Comment #12
k.skarlatos CreditAttribution: k.skarlatos commentedWith this patch i get this warning:
Warning: array_filter() expects parameter 1 to be array, null given in EntityCacheControllerHelper::entityCacheLoad() (line 64 of /var/www/clients/client1/web2/web/sites/all/modules/entitycache/entitycache.module).
Comment #13
holtzermann17 CreditAttribution: holtzermann17 commentedAttached patch combines the idea from #7 and the comment from #12.
Comment #15
Dave ReidThis is a duplicate of this core bug: #1003788: PostgreSQL: PDOException:Invalid text representation when attempting to load an entity with a string or non-scalar ID.
Comment #16
Dave ReidNevermind, it looks like entitycache needs to fix this core bug as well. Let's instead merge this with #1851398: PDOException:Invalid text representation when attempting to load an entity with a string ID which has a more detailed patch in progress.
Comment #17
hansrossel CreditAttribution: hansrossel commented