Help with a broken empty view
| Project: | Views |
| Version: | 5.x-1.6 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
We did something stupid or so but we don't know what it was.The result is that at one of our content types we get the following errors:
* warning: Invalid argument supplied for foreach() in /var/www/drupal.akademie.de/htdocs/sites/all/modules/views/views_query.inc on line 83.
* warning: Invalid argument supplied for foreach() in /var/www/drupal.akademie.de/htdocs/sites/all/modules/views/views_query.inc on line 16.
* warning: Invalid argument supplied for foreach() in /var/www/drupal.akademie.de/htdocs/sites/all/modules/views/views_query.inc on line 197.
If I print_r all views, at this content type I get the following view (in addition to the working ones):
stdClass Object
(
[build_type] => items
[type] =>
[use_pager] =>
[pager_limit] => 0
[current_page] => 0
[offset] => 0
[used_filters] => Array
(
)
)Has anyone got an idea what went wrong and where to look to fix this? Thanks for any help.

#1
using the devel module, I could find out, that the problem is with _views_load_view in the query SELECT v.* FROM view_view v WHERE v.name = 'autor'. The view autor has been deleted, so that explains why there are errors when trying to load that view.
What I do not know though is why that view is being loaded at all.
Can anyone point me in the right direction?
#2
If you haven't already, you should clear the Views cache on your site. You can find the button to "Clear views cache" at:
http://www.mysite.com/admin/build/views/tools
#3
I did try that, thanks. It didn't help though.
I now have created a completely empty view that is called "autor". That results in at least the error messages to be gone.
I still have no idea where to look for the real solution though.
#4
You probably have something loading the code manually. You should do a debug backtrace, figure out exactly where the code is that's loading the view, and then start examining the data.
#5
Found it: Some custom pager that everyone had forgotten was using that view. Now, all is fine again. :)
#6
Automatically closed -- issue fixed for two weeks with no activity.