* user warning: Not unique table/alias: 'tn' query: SELECT COUNT(DISTINCT(n.nid)) FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_node tn ON tn.nid = n.nid WHERE (tn.tid = 6) AND ( tn.tid IN (2) AND n.status = 1) in /home/www/drupal/includes/database.mysql.inc on line 172.
* user warning: Not unique table/alias: 'tn' query: SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_node tn ON tn.nid = n.nid WHERE (tn.tid = 6) AND ( tn.tid IN (2) AND n.status = 1 ) ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 10 in /home/www/drupal/includes/database.mysql.inc on line 172.

CommentFileSizeAuthor
#4 multidomain_fix_query.txt935 byteswayland76

Comments

Gábor Mayer’s picture

... with multiple domains module

wvlgen’s picture

I have this problem when I want to display "newsletters".

* user warning: Not unique table/alias: 'tn' query: SELECT COUNT(DISTINCT(n.nid)) FROM ----node n INNER JOIN ----term_node tn ON n.nid = tn.nid INNER JOIN ----term_node tn ON tn.nid = n.nid WHERE (tn.tid = 84) AND ( tn.tid IN (69,75,71,74,72,68,73) AND n.status = 1) in /usr/home/---t/public_html/includes/database.mysql.inc on line 172.
* user warning: Not unique table/alias: 'tn' query: SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM ----node n INNER JOIN ----term_node tn ON n.nid = tn.nid INNER JOIN ----term_node tn ON tn.nid = n.nid WHERE (tn.tid = 84) AND ( tn.tid IN (69,75,71,74,72,68,73) AND n.status = 1 ) ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 5 in /usr/home/----/public_html/includes/database.mysql.inc on line 172.

(prefix replaced by ----).

swe3tdave’s picture

Project: Taxonomy Menu » Multiple Domains
Component: Code » url rewrite functionality

From dimanjy23 in http://drupal.org/node/166610:

If you have some problems in MySQL queries while using multidomain with other modules, just rename the alias for MySQL queries from 'tn' to 'txn' (for example). I found this bug using multidomain with taxonomy_menu module.

Works perfectly, changing every reference of tn to txn in multipledomain.module corrected the problem for me..

wayland76’s picture

Status: Active » Needs review
StatusFileSize
new935 bytes

Ok, but why should we have to. Here's a patch against the DRUPAL-5 branch that does that (except it's multidomain_tn, not txn; that way, it's unlikely to ever conflict with anything ever again).

wayland76’s picture

Component: url rewrite functionality » code
Status: Needs review » Reviewed & tested by the community

I should've marked this "Ready to be committed"

summit’s picture

Hi,
Is this module still maintained?
If so please commit this patch.

greetings,
Martijn

betz’s picture

Status: Reviewed & tested by the community » Fixed

Patch committed to the development snapshot.

Status: Fixed » Closed (fixed)

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