Closed (works as designed)
Project:
Drupal core
Version:
7.15
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2012 at 15:40 UTC
Updated:
29 Aug 2012 at 20:52 UTC
Hey guys,
I have just upgraded my Drupal 6 to Drupal 7, everything looks fine, except that when I'm viewing nodes from some content types I created I see this:
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /path/to/drupal/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of /path/to/drupal/includes/entity.inc).
How can I fix this?
Thanks
Comments
Comment #1
jfha73 commentedI just noticed that this is only happening when there is a link field in the node.
Comment #2
jfha73 commentedDisregard my last comment, it's happening to more people with or without link module so it must be something else.
Comment #3
jfha73 commentedHey guys,
I found that adding array_filter to these two lines solves the warnings showing up, you might want to consider adding it in future versions.
This is what I changed it to and it works:
File: entity.inc
Comment #4
aspilicious commentedThis is probably caused by a broken contrib module. Turn of some modules untill you found the broken module and report your issue there.
Don't hack entity.inc...
Comment #5
jfha73 commentedI have been trying, but the module I thought was the cause, it was not, besides I have not seen any good info to lead me to the correct answer, so all I could do was that, until I can find an answer for it.
Thanks for the advice though.
Comment #6
jfha73 commentedThis is the thing I'm only getting these warnings when viewing nodes that have the following Modules/Fields:
Link
Date
Taxonomy terms
AFTER upgrading from D6, I just created a new Content type with link and Date fields and it works just fine, which tells me there must be something done during upgrade or with Taxonomy, because I just noticed this appears in the Logs:
Notice: Undefined index: tid in taxonomy_field_formatter_prepare_view() (line 1580 of /path/to/drupal/modules/taxonomy/taxonomy.module).Along with the warning.
Comment #7
aspilicious commentedAuwch. Its probably to much work to recreate the taxonomy fields?
Comment #8
jfha73 commentedGot it to work by going to the Manage Display of the content type showing the warning and changing the Format of the field(s) with the problem, then changing it back to where it was before.
Comment #8.0
jfha73 commentedcorrecting a typo