Unknown column 'n.language'

andrewsuth - March 31, 2009 - 02:12
Project:Terms of Use
Version:6.x-1.10
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I get the following warnings when I save the configurations after entering a valid node for my Terms of Use:

user warning: Unknown column 'n.language' in 'where clause' query: SELECT nr.title FROM node_revisions nr WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) AND ( LOWER(nr.title) LIKE LOWER('%39%')) LIMIT 0, 10 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\terms_of_use\terms_of_use.pages.inc on line 15.
user warning: Unknown column 'n.language' in 'where clause' query: SELECT nr.title FROM node_revisions nr WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) AND ( LOWER(nr.title) LIKE LOWER('%39@link%')) LIMIT 0, 10 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\terms_of_use\terms_of_use.pages.inc on line 15.

I think it has something to do with the node language vs. the administration language.

#1

Chill35 - March 31, 2009 - 21:38

Anyone else seeing this?

#2

pban02 - June 17, 2009 - 11:10

I am seeing it too. Happens when you have more than 1 language enabled.

#3

pban02 - June 17, 2009 - 11:11
Priority:normal» critical

#4

geilner - June 25, 2009 - 09:00

I have the same problem with the search files module.

#5

asak - July 21, 2009 - 18:24

Just noticed this myself while installing this modules.

Seems like revisions use no language... that's controlled by the 'node' table in the DB.

BUT - this seems to work even with this warning - the correct node is selected and displayed on registration, and even works with multilingual after adding the variables to i18n as written @ http://drupal.org/node/299416#comment-1577576.

#6

jennifer.chang - August 20, 2009 - 02:29

subscribe

#7

hefox - September 11, 2009 - 14:31

Why is it using node revision? That'll cause multiple titles of the same node when node revisions are used since there's multiple instantaneous of the same node, if the title has been changed.

Current title is stored in the node title to my knowledge, so it's fine to use {node} to my understanding

http://api.drupal.org/api/function/db_rewrite_sql/6

patch done inside terms_of_use directory. Changes node_revision to node and nr to n

AttachmentSize
terms_of_use_sqlwarning.patch 682 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.