I get two error messages - I think it is caused by Workflow, but I'm not sure.
Situation: I have a view with 'Search: Search Terms' as exposed filter. Searches with 1 or 2 characters are not permitted, because of the search settings. When an anonymous user searches for a two letter word, the following messages appear:
- You must include at least one positive keyword with 3 characters or more.
- 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 'INNER JOIN inter_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 A' at line 1 query: SELECT COUNT(*) FROM ( INNER JOIN inter_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'workflow_access') OR (na.gid = 0 AND na.realm = 'workflow_access_owner')))) count_alias in /var/www/naktuinbouw/sites/all/modules/views/includes/view.inc on line 729.
- 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 'INNER JOIN inter_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 A' at line 1 query: INNER JOIN inter_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'workflow_access') OR (na.gid = 0 AND na.realm = 'workflow_access_owner'))) LIMIT 0, 10 in /var/www/naktuinbouw/sites/all/modules/views/includes/view.inc on line 755.
Thanks for your support.
Comments
Comment #1
dawehnerthis looks like a completly empty query, but rewritten with node_db_rewrite_sql.
Comment #2
marcvangendOK, so that would mean that this problem is perhaps not workflow-related, but caused by another module trying to run a query. I'll look into it (if my colleague didn't fix it already). Marking this as fixed for now.
Comment #4
miaoulafrite commentedhi, i also have the problem, i'm using workflow as well
did you found out anything on this issue yet?
thanks
Comment #5
rooby commented@marcvangend:
It's a long shot being so long ago but did you find a solution?
I have the same problem when I have an exposed filter and when it get's a validation error the view still runs because the view is passing an empty query into the db_rewrite_sql() function, which results in the views query being the access control query part only.
In my case the query is :
That is the full sql for the view, which is why the error.
But why is it ending up like that?
Comment #6
rooby commentedI found the problem - #571234: SQL error on views exposed filter autocomplete error handling
It was resolved in the views release 6.x-2.14