Closed (won't fix)
Project:
Views Alpha Pager
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2007 at 11:08 UTC
Updated:
30 Oct 2007 at 12:38 UTC
Hi,
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 ''') AND (. IN ('')) ORDER BY left(trim(LEADING 'het ' FROM (tri query: views_alpha_pager_views_query_alter SELECT DISTINCT left(trim(LEADING 'het ' FROM (trim(LEADING 'de ' FROM (trim(LEADING 'een ' FROM (trim(LEADING 'and ' FROM (trim(LEADING 'the ' FROM (trim(LEADING 'a ' FROM (trim(LEADING '\'' FROM (trim(LEADING '"' FROM (trim(LEADING ' ' FROM (upper(node.sticky))))))))))))))))))), 1) FROM node node WHERE (. '') AND (. IN ('')) ORDER BY left(trim(LEADING 'het ' FROM (trim(LEADING 'de ' FROM (trim(LEADING 'een ' FROM (trim(LEADING 'and ' FROM (trim(LEADING 'the ' FROM (trim(LEADING 'a ' FROM (trim(LEADING '\'' FROM (trim(LEADING '"� in
The part WHERE (. '') AND (. IN ('')) is troublesome.
AFAIKS it is caused by an arronous use of $query->add_where($clause), somewhere along the line the args are 'lost'.
Comments
Comment #1
douggreen commentedIt appears that like the views WHERE arguments aren't being properly used.
Can you confirm that it's this query on line +150 that's causing the problem?
If you print_r($query->where_args) do these look right?
This could be
Comment #2
douggreen commentedComment #3
jenlamptonI'm having the same problem with this module...
Here are my resutls for print_r($query->where_args):
To answer your other questions...
1) I do not get this problem with the default, numeric, pager.
2) I am not using arguments.
3) I am not using views_fastsearch, but I will check their notes about this error.
4) here is the error message, with junk filters removed:
Jen
Comment #4
jenlamptonAha!
I removed the filter "Node: Distinct" and the error disappeared, but the where clause output didn't change:
I'm not sure how that filter is usually handled, but maybe it's not dealt with correctly in this module?
Jen
Comment #5
douggreen commentedThe DISTINCT views filter causes all sorts of problems with the way Drupal handles query rewrites. Avoid it unless you really need it.