I'm not sure if this is H.S. related or views related. It -feels- very H.S. related and I'm wondering if others have experienced this.

When I select "Any" as the option for the top level term and hit "Apply", I get:

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 'LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE ' at line 4 query: SELECT COUNT(*) FROM (SELECT node.nid AS nid FROM node node INNER JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = All LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (node.type in ('partner_resource', 'resource')) AND (term_node_value_0.tid = 0) ) count_alias in [...] modules/acquia/views/includes/view.inc on line 729

Comments

aelling’s picture

I also get a very similar error.

user warning: 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 'WHERE (node.type in ('messages')) AND (term_node_value_0.tid = 0) LIMIT 0, 1' at line 6 query: SELECT node.nid AS nid, node.title AS node_title, node.vid AS node_vid FROM node node INNER JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = All WHERE (node.type in ('messages')) AND (term_node_value_0.tid = 0) LIMIT 0, 10 in C:\wamp\www\aelling\sites\all\modules\views\includes\view.inc on line 757.

It is not necessarily connected with Content Taxonomy as I get the same result using just Hierarchical Select Taxonomy Views. The view filters properly until the filter is reset to "Any" from the first dropdown and "Any" is passed through the url (http://192.168.1.100/austinelling/messages?tid[]=All) which is not a tid. I noticed if I passed 0 through the url ( http://192.168.1.100/aelling/messages?tid[]=0) instead, the filter works as expected. Not sure if that is the correct approach but thought it was worth mentioning.

nally’s picture

Good eye on spotting the associated URL. I too get "All" instead of a numerical value for my error case. Here is the associated HTML:

<option value="All" class="has-no-children" selected="selected">&lt;Any&gt;</option><option value="26" class="has-children">Agricultural Markets and Trade</option>
Rasti’s picture

Status: Active » Needs review

Hi

I was having same problem, but i notice that this happen when i choose 'Save term lineage' in HS configuration and gave u this message '''Because you've enabled the 'Save Lineage' setting, the operator has been set to 'AND' and cannot be changed by the end user.''' and that force the view filter operator set to 'Is All Of' , i change back to 'Save only the deepest term' and select 'Is One Of' operator that work for ..Any.. and return all nodes.

wim leers’s picture

Title: Apply searching for "Any" results in SQL error » Apply searching for "Any" results in SQL error when Save term lineage is enabled
Component: Code - Content Taxonomy Views » Code - Taxonomy Views
Status: Needs review » Active

Reproduced.

Wrong status: there is nothing to review!

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Fixed

1) Renamed "All" to "Any" and "HS_TAXONOMY_VIEWS_ALL_OPTION" to "HS_TAXONOMY_VIEWS_ANY_OPTION". In Views 1, there was the "All" option, and in Views 2, it's called the "Any" option. That's why.
2) Fixed this problem.

See http://drupal.org/cvs?commit=265566.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.