Closed (duplicate)
Project:
Terms of Use
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2010 at 09:14 UTC
Updated:
3 Jan 2010 at 12:42 UTC
My terms_of_use autocomplete callback was broken as i got error messages like
user warning: Unknown column 'n.language' in 'field list' query: SELECT DISTINCT(n.nid), nr.title FROM node_revisions nr WHERE (n.language ='de' OR n.language ='' OR n.language IS NULL) AND ( LOWER(nr.title) LIKE LOWER('%Nutzungsbedingung%')) LIMIT 0, 10 in /home/sites/swdt/web/sites/all/modules/terms_of_use/terms_of_use.pages.inc on line 16.
I dunno exactly why but it seems the translation system does a rewrite and adds language checks to every query containing something like {node...
This might be a bug since it adds conditions for {node} which don't show up in this query at all.
However joining to {node} wouldn't be wrong at all.. Actually i finally don't understand why you're selecting the node_revision (containing stale revisions) for the title which is present at {node} in the latest revision...
Attached patch corrects the join to {node} which works perfect for us.
| Comment | File | Size | Author |
|---|---|---|---|
| terms_of_use_join.patch | 626 bytes | miro_dietiker |
Comments
Comment #1
miro_dietikerduplicate of #412370