When activating "Require associated node" option on a Hierarchical Select views exposed filter, you get 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 ') count_alias' at line 1 query: SELECT COUNT(*) FROM () count_alias in .../sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 555

I'm using Views 3.

The source of the problem is two empty variables in hs_taxonomy_views.module, lines 519-520:
$temp_view->build_info['count_query'];
$temp_view->build_info['query_args'];
Should be:
$temp_view->query->count_query;
$temp_view->query->query_args;

CommentFileSizeAuthor
#1 views-filter-require-node-1536648-1.patch943 bytespeterpoe

Comments

peterpoe’s picture

Version: 6.x-3.8 » 6.x-3.x-dev
StatusFileSize
new943 bytes

Patch here.
Should be backwards-compatible with Views 2.

peterpoe’s picture

Status: Active » Needs review
wim leers’s picture

radoya’s picture

I sow that this patch is already implemented in version 6.x-3.8+2-dev but I still have error in SQL syntax:

SELECT COUNT(*) FROM () count_alias in hierarchical_select/modules/hs_taxonomy_views.module on line 555.

Any idea?