When viewing a project's page I receive the following error:

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 term_data td ON td.tid = tn.tid WHERE (r.pid = 13) AND (n.status =' at line 1 query: SELECT DISTINCT(n.nid), tn.tid, r.* FROM node n INNER JOIN project_release_nodes r ON r.nid = n.nid INNER JOIN term_node tn ON n.nid = tn.nid AND tn.tid in () INNER JOIN term_data td ON td.tid = tn.tid WHERE (r.pid = 13) AND (n.status = 1) AND r.rebuild = 1 ORDER BY td.weight, td.name, r.version_major, r.version_minor, r.version_patch, r.file_date in /home/anjori/public_html/includes/database.mysql.inc on line 172.

Everything was fine up until today, so I'm not sure what changed.

CommentFileSizeAuthor
#1 project_124875.patch.txt1.22 KBdww

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
StatusFileSize
new1.22 KB

The problem is if your site doesn't define any "Active Project release API compatibility terms" at admin/project/project-release-settings (the "Project release API compatibility" part of that is just the name of a vocabulary, so if you customized that on your site, it would be different). If there are no active terms, the query builder generates a bogus query in this case. :( Attached patch fixes it such that if no terms are active, then all terms are displayed.

hunmonk’s picture

Status: Needs review » Reviewed & tested by the community

code style is good. seems like a no-brainer

dww’s picture

Status: Reviewed & tested by the community » Fixed

Comitted to HEAD and DRUPAL-4-7--2.

Anonymous’s picture

Status: Fixed » Closed (fixed)