Jump to content


Photo

"Invalid argument supplied for foreach()" solved: plugin incompatibility w/ W3 Total Cache


  • Please log in to reply
3 replies to this topic

#1 mklatt

mklatt

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 November 2011 - 08:51 AM

Ladies and Gents, the other day, the infamous "Invalid argument supplied for foreach()" struck my homepage. I tried to add a new feature slide in the admin panel and upon clicking save: voila! My database was trashed. The values for "pagelines_options" and "pagelines_options_redundant" were emptied, the Dashboard was unresponsive and the site was flooded with errors like the one in the title. Users of WhiteHousePro have experienced this before (just search for "invalid argument supplied") and the cliche support-answer was always: "Update you PHP-Installation, if that doesn't help, reinstall your blog". Well, in this case I could narrow the problem down to a very popular plugin, namely W3 Total Cache. The weird thing is that I had been using the theme with this plugin for months without any hiccups. I therefore can't put a finger on when exactly the problem started occurring. Has anyone made similar experiences or knows of a fix? A dev statement would also be nice! Please discuss :)

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 16247 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 07 November 2011 - 09:32 AM

Hi Mklatt, You mention that you have used the plugin (W3 Total Cache) for months without any problems, so before your site started going crazy did you do any changes, like install new plugins or update any plugins ect... As W3 Total Cache shouldnt be touching your features, any more details you can think of, that happend prior to this would be very helpful.

#3 mklatt

mklatt

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 November 2011 - 11:03 PM

Hey, I have made no major changes to the site in quite some time. I took the time of testing the site with only one plugin at a time enabled and total cache was the only one that I could reproduce the error with. I have a strong feeling it has something to do with the built-in databse optimization, since the database getting empited (see above) is the root of the actual problem. However, I have no deeper understanding of how the total cache plugins work. Maybe you could reproduce that setup in a testing environment an see if you too can reproduce the error?

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 16247 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 08 November 2011 - 09:53 AM

There's little doubt that W3 Total Cache is an awesome plugin but it's one of them plugins when you first install, see the list options at your disposal, it can be overwhelming. Regarding trying to reproduce your error via a testing environment, I think the best option for you would be to contact both your host, inform them of your situation and to contact the author of W3 Total Cache and ask him for advise, tell him whats happening to your database and see what they both come back with.