Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | terms_of_use_sqlwarning.patch | 682 bytes | hefox |
Comments
Comment #1
Chill35 CreditAttribution: Chill35 commentedAnyone else seeing this?
Comment #2
prodosh CreditAttribution: prodosh commentedI am seeing it too. Happens when you have more than 1 language enabled.
Comment #3
prodosh CreditAttribution: prodosh commentedComment #4
cchamp CreditAttribution: cchamp commentedI have the same problem with the search files module.
Comment #5
asak CreditAttribution: asak commentedJust 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.
Comment #6
jennifer.chang CreditAttribution: jennifer.chang commentedsubscribe
Comment #7
hefox CreditAttribution: hefox commentedWhy 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
Comment #8
miro_dietikerposted a duplicate issue on #673002: autocomplete broken in case of translation with same solution.
marking this RTBC.
Comment #9
Kars-T CreditAttribution: Kars-T commented#418960 by hefox | pban02: Fixed Unknown column 'n.language'.
Changed the line to
because MySQL is not case sensitive by default and the lower steals us performance.