2

Hello i dont know where to begin. All of a sudden MY WEBSITE is displaying this error when i view a node-

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/onlineba/public_html/onlineplac.es/includes/entity.inc). Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 355 of /home/onlineba/public_html/onlineplac.es/includes/entity.inc).

I havent added anything or changed anything. I was hoping it was because OG groups upgraded to 7.2 but i seem to get it when viewing a node that is not in a group. Let me see my page content type as thats got no OG fields attached or postable in groups.... yes exactly the same thing. its only got a title, body and image field attached to it. Oh and a term referance. Lets remove that...yes still the same.

Panels node page is disabled. Im sorry i cant tell you anymore about my problem but if anyone could be a lifesaver and offer any advice it would be gratefully reveived. I get really depressed when things like this happen. :(

thanks

4
  • ah wait a sec. it goes away when i disable the php filter module. it could be a cache thingy with boost. The lines of the error seem to relate to cache. there is hope for me yet :)
    – Reg Gordon
    Commented Apr 23, 2013 at 22:46
  • ooops never meant to reply there. line 178 $passed_ids = !empty($ids) ? array_flip($ids) : FALSE; and 355 is $entities += array_intersect_key($this->entityCache, array_flip($ids)); cache mentioned again. maybe ive got some old php blocks in my cache. i will go investigate more
    – Reg Gordon
    Commented Apr 23, 2013 at 22:47
  • yes it seems related to me enabling the php filter module. I dont hve any php blocks or panels added. Could there be some caching probs in the database with it you think? Id really like to be able to add a small bit of php for my Flag: taxonmy term link. thanks
    – Reg Gordon
    Commented Apr 23, 2013 at 23:11
  • 1
    ah this could be important. its all part of the same puzzle - The following token types are not defined but have tokens: $info['types']['taxonomy_term'] oart of my flag term php (disabled) has this in it..- php print flag_create_link('flagtags', %taxonomy_term:tid) maybe i better check the flag issue queue
    – Reg Gordon
    Commented Apr 23, 2013 at 23:23

1 Answer 1

4

Something is calling entity load with an incorrect $ids parameter.

This could be from something like node_load() or equivalent or node_load_multiple() or equivalent. If you pass in the wrong type of value into any of these you could end up with the error you mention.

If you want, add just above line 178 the line

print_r($ids);

Then reload the problem page and you will get a bunch of text print out. Post the text back here (if you can upload files and there is a lot of output you could paste it in a txt file and post it).

1
  • thnks rooby. I ended up sorting out the thing that was causing the error. Actually i didnt i found a way of doing things that didnt involve using php in a block. What you say is correct though. I belive it was a token that wasnt supported. Thanks for your time and attention
    – Reg Gordon
    Commented Apr 24, 2013 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.