Project:Quotes
Version:6.x-1.40
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (cannot reproduce)

Issue Summary

Watchdog reports this error every time a quote block is viewed:

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 ''. qur USING(uid) WHERE n.status=1 AND n.type='quotes' AND q.promote = 1 AND (' at line 1 query: SELECT DISTINCT(n.nid) FROM quotes q INNER JOIN node n ON q.vid=n.vid LEFT JOIN users_roles '. qur USING(uid) WHERE n.status=1 AND n.type='quotes' AND q.promote = 1 AND (qur.rid IN (777) OR (1 IN (777) AND n.uid = 0)) ORDER BY RAND() LIMIT 0, 1 in /var/www/vhosts/pingv/htdocs/sites/all/modules/contrib/quotes/quotes.module on line 1224.

See attached patch for fix.

AttachmentSize
quotes.patch1.65 KB

Comments

#1

thanks for the patch, it works perfectly for me! i was getting the same error, and my quote blocks weren't appearing at all. it seems to be related to this: http://drupal.org/node/296267

#2

Status:needs review» postponed (maintainer needs more info)

Thanks for the patch. I don't really see why it should work. I also don't know if it would be valid in Postgres, which is more picky than MySql about syntax.

I am not seeing this with the current -dev release. Please update to that and see if your patch is still needed.

#3

Status:postponed (maintainer needs more info)» closed (cannot reproduce)

No further information.

nobody click here