create new VIEW.
add only VUD_node_field.

as result: SELECT FROM node node

nothing more. after save VIEW

 warning: Invalid argument supplied for foreach() in /home/u4586/domains/special.yogalife.by/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 924.

warning: Invalid argument supplied for foreach() in /home/u4586/domains/special.yogalife.by/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1000.

warning: Invalid argument supplied for foreach() in /home/u4586/domains/special.yogalife.by/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 924.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM node node ) count_alias' at line 2 query: SELECT COUNT(*) FROM (SELECT FROM node node ) count_alias in /home/u4586/domains/special.yogalife.by/sites/all/modules/views/plugins/views_plugin_pager.inc on line 141.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM node node LIMIT 0, 10' at line 2 query: SELECT FROM node node LIMIT 0, 10 in /home/u4586/domains/special.yogalife.by/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1150.

to solve it, i only have to add node title.

CommentFileSizeAuthor
#8 Views_1292736.patch1.12 KBwebaccess

Comments

marvil07’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

It would be great if you can try to reproduce it on the top version of 6.x-2.x branch.

BTW are you using views 2 or views 3?

Update: the reason for trying on top of it is #1253390: Make vud submodules views fields implementations compatible with views 3 that maybe can be related.

emcniece’s picture

kervi, any chance you could elaborate on this? I hit this in an upgrade from 2.x to 3.0-rc2.

dgastudio’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

sorry, i have update to 7 recently. sorry for wasting your time. thanks.

emcniece’s picture

No problem. For the record, the problem was that the update changed views (substantially) and the information I had previously selected wasn't cutting it. I added a general field (node:nid) to my default view and removed it from display, and the view worked again.

unc0nnected’s picture

Project: Vote Up/Down » Views (for Drupal 7)
Component: vud_node » Code
Status: Closed (cannot reproduce) » Active

this error is popping up for me however I don't have vote up or down so I change the project for this ticket to views. Something that may shed light on this, or may not who knows, is that this error does not appear for the admin user, only other users. I have taken the above mentioned advice and all nodes, all blocks, all pages anything and everything that is on the page has a title.

# warning: Invalid argument supplied for foreach() in /path/to/domain/drupal/modules/views/plugins/views_plugin_query_default.inc on line 924.
# warning: Invalid argument supplied for foreach() in /path/to/domain/drupal/modules/views/plugins/views_plugin_query_default.inc on line 1000.
# warning: Invalid argument supplied for foreach() in /path/to/domain/drupal/modules/views/plugins/views_plugin_query_default.inc on line 924.

edit: Alright I've discovered that this error only shows up when the specific user doesn't have permission to view certain elements on the page. Actually these errors show up only when the user doesn't have access to: view field_fupload. Having no access to anything else doesn't cause the error, only when the user looses access to an fupload field

dawehner’s picture

Title: Bug in views » Invalid argument foreach in query_default.inc 924/1000 when user has no access to any field
Version: 6.x-2.x-dev » 6.x-3.x-dev

Update title to something useful.

In general it really helps us if you read http://drupal.org/node/571990 and answer some of the suggestions made there.

unc0nnected’s picture

In my experience this error only crops up when the user doesn't have access to one field in particular(fupload). Not having access to anything besides this illicits no error message

webaccess’s picture

StatusFileSize
new1.12 KB

Hi,
I got these foreach warnings even if user have all permissions. These warnings are on admin account as well.
I have created a simple patch and it helps me to remove warnings.

--Swati K.

chris matthews’s picture

Status: Active » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue