views 6.3.x-dev
+ Flag + Hierarchical select as exposed filter.

i want to display link to flag/unflag each row in table.

Adding relationship: flag, node flag, unchecked the option "include only flagged content". Any user.

added field: flag link.

    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2230, 2232, 2233, 2234) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2114, 2252, 2253, 2254, 2129, 2131, 2130, 2255, 2128) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2111, 2235, 2236, 2115, 2117, 2118, 2237, 2238, 2239, 2116, 2240) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2228, 2231, 2229, 2226) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2112, 2122, 2119, 2121, 2241, 2120, 2242, 2243, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2244) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
    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 '***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') A' at line 19 query: SELECT COUNT(*) FROM (SELECT DISTINCT node.title AS node_title, node.nid AS nid, node.type AS node_type, node.vid AS node_vid, node_data_field_directory_time.field_directory_time_value AS node_data_field_directory_time_field_directory_time_value, node_data_field_city.field_city_value AS node_data_field_city_field_city_value, node_data_field_city.delta AS node_data_field_city_delta, node_data_field_directory_time.field_category_value AS node_data_field_directory_time_field_category_value, node.uid AS node_uid, node_revisions.format AS node_revisions_format, flag_content.content_id AS flag_content_content_id FROM node node LEFT JOIN flag_content flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = 1 LEFT JOIN votingapi_cache votingapi_cache_node_points_vote_up_down_count ON node.nid = votingapi_cache_node_points_vote_up_down_count.content_id AND (votingapi_cache_node_points_vote_up_down_count.content_type = 'node' AND votingapi_cache_node_points_vote_up_down_count.value_type = 'points' AND votingapi_cache_node_points_vote_up_down_count.tag = 'vote_up_down' AND votingapi_cache_node_points_vote_up_down_count.function = 'count') INNER JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN content_type_directory node_data_field_directory_time ON node.vid = node_data_field_directory_time.vid LEFT JOIN content_field_city node_data_field_city ON node.vid = node_data_field_city.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN flag_content flag_content ON node.nid = flag_content.content_id AND (flag_content.fid = 1 AND flag_content.uid = ***CURRENT_USER*** AND flag_content.sid = 0) WHERE node.type IN ('directory') AND term_node.tid IN (2124, 2125, 2123, 2126, 2127, 2113) ) count_alias in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module on line 535.
CommentFileSizeAuthor
#6 965482-placeholders.patch782 bytesdawehner

Comments

dawehner’s picture

Title: ***CURRENT_USER*** » Missing views_query_substitutions
Project: Views (for Drupal 7) » Hierarchical Select
Component: Code » Code - Taxonomy Views
as in /home/u3220/domains/ya7ya.by/sites/all/modules/hierarchical_select/modules/hs_taxonomy_views.module o

This kind of code is missing for hs_t_views
Add

        $replacements = module_invoke_all('views_query_substitutions', $view);
        $query = str_replace(array_keys($replacements), $replacements, $query);

to your code to fix this

dgastudio’s picture

Thank u very much!

i have added this lines to hs_taxonomy_views.module, but now the exposed filter hierarchical select only contain Any option.

dawehner’s picture

Can you please provide a patch?

wim leers’s picture

Status: Active » Needs work

dereine: where should those 2 lines of PHP you recommended in #1 go?

wim leers’s picture

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new782 bytes

Here is a patch.

This patch wasn't tested at all.

wim leers’s picture

Thank you very much, dereine! :) Now it's up to my users to test this.

Max_Headroom’s picture

Status: Needs review » Needs work

Fix is not working. Still get same errors and ended up the hs only showing as reported in #2.

Errors only appear after I selected "Require associated node" in settings.
I only have one hs field.

wim leers’s picture

Status: Needs work » Needs review
gold’s picture

Status: Needs review » Closed (won't fix)

Tidying up the issue queue. The 6.x version is no longer supported. Only reopen this if it also applies to the 7.x.