I deleted a few rows from the view_views table in my DB since i had about 100 views and it would take all day to delete them one by one in the admin....and now I'm paying the price for being in a hurry.

I'm getting these errors on every page. I'm guessing I've got some orphaned data or something, but I can't be sure. If anyone can point me in the right direction to get rid of these, I'd really appreciate it.

* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/views/views_query.inc on line 81.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/views/views_query.inc on line 16.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/views/views_query.inc on line 195.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/bio/bio_views.inc on line 260.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/bio/bio_views.inc on line 266.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/views/modules/views_node.inc on line 801.
* warning: Invalid argument supplied for foreach() in /home/bradflo2/public_html/methods/sites/all/modules/views/views_rss.module on line 56.

Comments

merlinofchaos’s picture

Try doing a TRUNCATE cache_views;

bflora’s picture

That didn't seem to help. I ran the query. Errors still there.

The views_cache table now as 5 rows in it again already, views_tables:en, views_default_views:en, views_urls, views_style_plugins:en and views_arguments:en

Should I delete these rows?

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Do you still experience this issue?

Anonymous’s picture

I have this problem as well.

Invalid argument supplied for foreach() in /home/mysite/public_html/sites/all/modules/views/modules/views_node.inc on line 801.

toma’s picture

I am using this tutorial
http://shellmultimedia.com/articles/managing-your-views-code

To turn view to module, i delete all my views from database (in drupal admin interface), got the same problem

sumitshekhawat7331’s picture

Run update.php and delete cache from Drupal admin

sumitshekhawat7331’s picture

Run update.php and delete cache from Drupal admin

toma’s picture

I still have the same php error even when i access the website as an admin, when i call the url /admin

Message	Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_query.inc à la ligne 195.
	Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_query.inc à la ligne 16.
toma’s picture

I do a Truncate views_cache, run update.php it doesn't seems to disapear , everytime i check any page i get this errors

Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_rss.module on line 56.

	Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/modules/views_node.inc on line 801.

Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_query.inc on line 195.

Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_query.inc on line 16.

	Invalid argument supplied for foreach() dans /home/dwebmast/public_html/sites/all/modules/views/views_query.inc on line 81.


konistehrad’s picture

I traced this problem back to the Custom Pager module retaining a textual reference to the old view after deletion. I imagine that any module that stores view names will encounter similar problems.

stephthegeek’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.