Error in query: ... AND (q.aid IN (none)) ...
Starbuck - April 13, 2009 - 03:25
| Project: | Quotes |
| Version: | 6.x-1.x-dev |
| Component: | Upgrading |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I had Quotes installed in v6.4 and just upgraded to v6.10. This is a test environment so it's possible something happened that's site-specific here but I'm documenting this in case it comes up elsewhere. On upgrading Drupal I also upgraded Quotes. The release ID is 6.x-1.x-dev. The prior version was from 2008-08-24 (according to quotes.info) and the current build is from 2009-03-15.
user warning: Unknown column 'none' in 'where clause' query: SELECT n.nid FROM quotes q INNER JOIN node n ON q.vid=n.vid WHERE n.status=1 AND n.type='quotes' AND q.promote = 1 AND (q.aid IN (none)) ORDER BY RAND() LIMIT 0, 1 in /home/.koontah/fatcat/portals/test01/sites/all/modules/quotes/quotes.module on line 1225.
The code that generates the query looks like this:
$query = 'SELECT n.nid FROM {quotes} q INNER JOIN {node} n ON q.vid=n.vid '
. quotes_block_join_sql($filters)
.'WHERE n.status='. (int)($filters['block_type'] != 2) /* Type=2 is unpublished. */
." AND n.type='quotes' AND "
. ($promoted_only ? ' q.promote = 1 AND ' : '')
. quotes_block_where_sql($filters)
.' ORDER BY '. ($filters['block_type'] == 0 ? 'RAND()' : 'n.created DESC'); /* Type=0 is random. */The error is coming from quotes_block_where_sql from this statement:
if ($filters['aid_filter']) {
$where[] = " (q.aid IN ($filters[aid_filter])) ";
}HTH

#1
Same issue here.
#2
Okay, I have to ask, did you run update.php?
#3
Hmm, it looks like possibly the old version allowed 'None' to be selected in the author filter (which it should have, but doesn't now). The new code is not recognizing that as valid.
#4
I just committed a fix (to 6.x-1.x-dev) that allows the block filters to be turned off, which I think is what you need to do.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.