SQL Syntax
e_log - April 25, 2009 - 07:34
| Project: | Relevance |
| Version: | 6.x-2.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
I upgraded from 2.0 to 2.1 and now i get the following error message:
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 '))))))))))))))))))))))))) AS relevance FROM node n, term_node tn, term_data td W' at line 1 query: SELECT n.nid, n.title, (count(*) * (IF(td.vid = 3, 7, (IF(td.vid = 5, 6, (IF(td.vid = 14, 3, (IF(td.vid = 7, 3, (IF(td.vid = 6, 3, (IF(td.vid = 11, 1, (IF(td.vid = 9, 5, (IF(td.vid = 10, 2, (IF(td.vid = 22, 4, (IF(td.vid = 19, 1, (IF(td.vid = 17, 1, (IF(td.vid = 16, 4, ))))))))))))))))))))))))) AS relevance FROM node n, term_node tn, term_data td WHERE n.nid <> 103 AND td.tid = tn.tid AND tn.nid = n.nid AND tn.tid in (SELECT tn.tid FROM term_node tn WHERE tn.nid = 103) AND td.vid IN (3,5,14,7,6,11,9,10,22,19,17,16) GROUP BY n.nid ORDER BY relevance DESC,n.nid DESC LIMIT 5 in /modules/relevance/relevance.module on line 199.with 2.0 everything was fine.

#1
Hi there!
From 2.0 to 2.1, I've added a check in relevance configuration disallowing users to let unfilled fields for 'factor'. Probably, you had a configuration with no value for the term with id 16. I've corrected that, but probably you still have a field enabled but with no factor defined.
But additionally, I've added a check to verify if a factor is not defined.
Here goes a patch for you, while I'm preparing a new version with this and other bug fixes.
good luck!
#2
#3
Automatically closed -- issue fixed for 2 weeks with no activity.