Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Code - Taxonomy Views
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2010 at 14:26 UTC
Updated:
2 May 2012 at 18:30 UTC
Hi there!
I have one Taxonomy term filter exposed using HS. (Taxonomy Term modiffied default view)
If you try to use the options Display the node count or Require associated node my drupal returns
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 ') count_alias' at line 1 query: SELECT COUNT(*) FROM () count_alias in /usr/home/SITE.com/web/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
Four times
Any ideas?
Comments
Comment #1
skizzo commentedI am seeing the same error (repeated 50 times) when enabling exposed node count on 6.x-3.6. Changing issue category to Bug Report, please change back if already fixed in dev. Unassigning issue, @charlysole: please reassign if you are working on it. Thank you.
Additional configuration details:
Hierarchical Select
- Save only the deepest term
- Allow the user to choose a term from any level
- Display the node count: Enabled
- Require associated node: Disabled
- sizable: Disabled
- Level labels: Disabled
- Dropbox settings: Disabled
View
- Node View
- Style Table
- Filter: Taxonomy: Term Exposed
-- Operator: Is one of
-- Filter identifier: tid_1
-- Optional: Enabled This exposed filter is optional and...
-- Select terms from vocabulary (no additional restriction)
Comment #2
wim leersComment #3
wim leersSee #965482: Missing views_query_substitutions.
Comment #4
klopsen commentedI think it's other sort of thing than in #965482: Missing views_query_substitutions.
I've got similar case like @skizzo and you can see that 'count_query' at line 520 is empty. That's why $count_query is empty and nothing is added at final SELECT query.
The problem is I can't figure out why build_info['count_query'] isn't getting any results... Need to get deeper into view build() function at line 495 in hs_taxonomy_views.module.
Any help?
Comment #5
justinchev commentedThis ties into issue: http://drupal.org/node/1306002
It occurs when enabling "Display the node count" or "Require associated node".
Think it may only occur when using Views3 (6.x-3.0). I tried it with the latest version of Views2 and it worked.
BTW my error was:
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 C:\xampp\htdocs\...\sites\all\modules\hierarchical_select\modules\hs_taxonomy_views.module on line 555.
Comment #6
radoya commentedSame issue here.
Any solution for Views 3?
Comment #7
kurt.iverson commentedI have the same issue with Views 3 as well. Any suggestions?
Comment #8
kurt.iverson commentedComment #9
skizzo commentedReverting issue status, as needs review requires patch
Please refer to Status settings for an issue
Comment #10
wim leers1) "needs review" is wrong: there's no patch.
2) updated the issue title
3) this will need some investigative work to get it fixed
Comment #11
wim leers#1306002: HS + Views: exposed filters in page + hs_taxonomy_views results in user warning: SELECT COUNT(*) FROM () count_alias is a duplicate (and contains useful information).
Comment #12
wim leersFixed by @peterpoe's patch at #1536648-1: Error when activating "Require associated node" option on views exposed filter.
Commit a77b507 for D7, 6ca6e7a for D6.
Comment #13
kurt.iverson commentedthis worked for me, thanks!