From: tonimueller.unihalle@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #9278: Error: SQLSTATE[42702]: Ambiguous column: 7 ERROR: column reference "tid" is ambiguous LINE 8: ...
Date: Wed, 19 Feb 2014 16:49:28 +0000
Message-ID: <20140219164928.2699.52017@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 9278
Logged by: Toni Müller
Email address: tonimueller.unihalle@gmail.com
PostgreSQL version: 9.1.0
Operating system: Ubuntu 13.10
Description:
Hello PostgreSQL developers,
there is an unsolved bug probably in PostgreSQL which from 2010 still
persists in combination with Drupal7 and its Taxonomy module (7.26) if you
want to create a Tag Cloud based on Taxonomy terms. This issue doesn't exist
with MySQL.
In Drupal7 I created a view for a tag cloud in drupal 7 based on Taxonomy
terms (Module Taxonomy 7.26). The problem is to add the Field '(node)
COUNT(Content: Nid)' with Count Aggregation type to count all terms and
display equal terms as one representative with the account of one term's
sum. With this field the following error appears already in the view
settings:
SQLSTATE[42702]: Ambiguous column: 7 ERROR: column reference "tid" is
ambiguous LINE 8: ... taxonomy_term_data_name, taxonomy_term_data_vid, tid,
taxon... ^
The view itself can't be displayed as block and Tag cloud, respectively only
if the Field '(node) COUNT(Content: Nid)' is added.
I believe that the best Open Source database can count! ;-)
It would be great if PostgreSQL and taxonomy module experts could fix this
issue.
Thank you!
Best wishes,
Toni
PS: View Export code:
$view = new view();
$view->name = 'tags_cloud';
$view->description = 'Taxonomy tags cloud block (with counter)';
$view->tag = 'default';
$view->base_table = 'taxonomy_term_data';
$view->human_name = 'Tags cloud';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view
disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Tags';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] =
FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] =
'200';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Relationship: Taxonomy term: Content with term */
$handler->display->display_options['relationships']['nid']['id'] = 'nid';
$handler->display->display_options['relationships']['nid']['table'] =
'taxonomy_index';
$handler->display->display_options['relationships']['nid']['field'] =
'nid';
$handler->display->display_options['relationships']['nid']['group_type'] =
'count';
/* Field: Taxonomy term: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] =
'taxonomy_term_data';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['label'] = '';
$handler->display->display_options['fields']['name']['alter']['word_boundary']
= FALSE;
$handler->display->display_options['fields']['name']['alter']['ellipsis'] =
FALSE;
$handler->display->display_options['fields']['name']['link_to_taxonomy'] =
TRUE;
/* Field: COUNT(Content: Nid) */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] =
'nid';
$handler->display->display_options['fields']['nid']['group_type'] =
'count';
$handler->display->display_options['fields']['nid']['label'] = '';
$handler->display->display_options['fields']['nid']['alter']['alter_text'] =
TRUE;
$handler->display->display_options['fields']['nid']['alter']['text'] =
'([nid])';
/* Filter criterion: Taxonomy vocabulary: Machine name */
$handler->display->display_options['filters']['machine_name']['id'] =
'machine_name';
$handler->display->display_options['filters']['machine_name']['table'] =
'taxonomy_vocabulary';
$handler->display->display_options['filters']['machine_name']['field'] =
'machine_name';
$handler->display->display_options['filters']['machine_name']['value'] =
array(
'all' => 'all',
'tags' => 'tags',
'world' => 'world',
);
$handler->display->display_options['filters']['machine_name']['group'] =
'0';
/* Display: Tags */
$handler = $view->new_display('block', 'Tags', 'block');
$handler->display->display_options['display_description'] = 'Tags cloud';
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['use_more'] = FALSE;
$handler->display->display_options['use_more'] = TRUE;
$handler->display->display_options['defaults']['use_more_always'] = FALSE;
$handler->display->display_options['defaults']['use_more_always'] = FALSE;
$handler->display->display_options['use_more_always'] = TRUE;
$handler->display->display_options['defaults']['use_more_text'] = FALSE;
$handler->display->display_options['use_more_text'] = 'More';
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] =
'40';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['block_description'] = 'Tags cloud';
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['path'] = 'tags';
Thank you very much for your support.
tonimueller.unihalle@gmail.com
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tonimueller.unihalle@gmail.com
Subject: Re: BUG #9278: Error: SQLSTATE[42702]: Ambiguous column: 7 ERROR: column reference "tid" is ambiguous LINE 8: ...
In-Reply-To: <20140219164928.2699.52017@wrigleys.postgresql.org>
References: <20140219164928.2699.52017@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox