Problem with languages ?

mondrawy - November 18, 2008 - 02:35
Project:Counter
Version:6.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I keep getting this error immediatly after installing the module.

user warning: Unknown column 'n.language' in 'where clause' query: SELECT COUNT(*) FROM counter WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) in /var/www/web192/html/sites/all/modules/counter/counter.module on line 167.

I have german & arabic installed as well and they display the same error with the language code changed accordingly.

#1

drupal-id.com - January 3, 2009 - 22:18
Status:active» postponed (maintainer needs more info)

I can't reproduce such error. Perhaps some settings in administer-site configuration-languages caused this bug. please try at least 6.x-1.4 and see.

#2

Dave Reid - September 25, 2009 - 14:46

Um...the query is not even using the {node} table. That's why this is failing.

#3

Dave Reid - September 25, 2009 - 14:49

I'm guessing that you're possibly running this query through db_rewrite_sql(). If that's the case and you are not using the {node} table to determine anything in your query, you shouldn't be using db_rewrite_sql() in the code.

#4

Dave Reid - September 25, 2009 - 14:52
Status:postponed (maintainer needs more info)» fixed

Confirmed in 6.x-1.2 db_rewrite_sql() was errantly used when the {node} table wasn't even in the SQL. It's not used in the latest versions, so upgrade.

#5

drupal-id.com - September 25, 2009 - 15:07

@Dave Reid thanks to point me to the bug location, also Danielb provides patch on this post http://drupal.org/node/386634
I will try to reproduce this on a multi-language site, fixed will be applied on 6.x-2.x version.

#6

drupal-id.com - September 25, 2009 - 23:16
Version:6.x-1.2» 6.x-2.0
Status:fixed» active

I have test Counter 6.x-2.0 and no error reported, please upgrade to Counter 6.x-.2.0 and report your result here, thanks.

#7

xecstasyx - October 2, 2009 - 17:40

i am using counter 6.x-2.0 and im getting kind of the same error at the report page user warning: Unknown column 'n.language' in 'where clause' query: SELECT COUNT(*) FROM counter WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) in /var/www/test02/sites/all/modules/counter/counter.report.inc on line 18.

#8

drupal-id.com - October 7, 2009 - 05:15

@xecstasyx:
This bug confirmed affect in the Multilanguage site, but I need more info to reproduce this error:
--> Tell me any modules you've used for your multi-language site

#9

xecstasyx - October 7, 2009 - 15:14

heres the list for multilanguage modules i am using right now, most of them comes with i18n module.

Block translation
Content type translation
Internationalization
Language Icons
Menu translation
Poll aggregate
Profile translation
Registration language
Synchronize translations
Taxonomy translation
Translation helpers
Translation overview
Translation table
Views translation

hope this helps

#10

deymos34 - October 23, 2009 - 20:52
Version:6.x-2.0» 6.x-2.1

I use Counter 6.x-2.1 and, unfortunately, also faced this problem:
user warning: Unknown column 'n.language' in 'where clause' query: SELECT COUNT(*) FROM counter WHERE (n.language ='en' OR n.language ='' OR n.language IS NULL) in /home/r/renatbiz/googlokhodcom/public_html/sites/all/modules/counter/counter.report.inc on line 18.

Of course, I also use i18n module (latest available 6.x-1.1). All its components, exept "Views translation", are enabled. Drupal version is 6.14.

#11

drupal-id.com - October 26, 2009 - 03:42
Status:active» needs work

I have found the location of this bug as pointed by "Dave Reid", this bug only happened when i18n module enable.
A bug fixing will available soon.

#12

drupal-id.com - October 26, 2009 - 05:13
Status:needs work» fixed

Bug fix available now!

6.x-2.2:
- New: Show Block/Unblock Users
- New: Redesign "Counter Settings" page
- New: Variable to show how many items per page on Counter Report
- Bug fix: Error on Counter Report when i18n module enable

NOTE: Since "Counter Settings" page was redesigned then you need to clear Drupal cache (Administer - Site Configuration - Performance : Clear Cached Data)

Please test and reporting back. Thanks.

#13

deymos34 - October 28, 2009 - 17:03

Thank you very much for your update! The error message vanished now. But, unfortunately, Counter still don't work on my site. In /counter/report I can see only this enscription:

Counter Report
# ID IP Address Created Date Access page

As you can see, there are no data.
And the Counter block shows us:

Counter
* Site Counter: 0
* Unique Visitor: 0
* Registered Users: 22
* Unregistered Users: 4
* Blocked Users: 0
* Published Nodes: 39
* Unpublished Nodes: 0
* Server IP: 77.222.40.91
* Your IP: 91.78.94.70
* Since:

The module do not see any visitors, though Access log and Count content views are enabled. And, for example, Drupal recent hits shows us all information:

10/28/2009 - 17:00 Top pages in the past 8 weeks
admin/reports/pages renat details
10/28/2009 - 17:00 node Anonymous details
10/28/2009 - 16:59 node Anonymous details
10/28/2009 - 16:58 node Anonymous details
10/28/2009 - 16:57 node Anonymous details
10/28/2009 - 16:56 node Anonymous details
10/28/2009 - 16:56 rss.xml Anonymous details
10/28/2009 - 16:56 node Anonymous details
10/28/2009 - 16:55 node Anonymous details
10/28/2009 - 16:54 node Anonymous details
10/28/2009 - 16:53 node Anonymous details
10/28/2009 - 16:52 node Anonymous details
10/28/2009 - 16:51 node Anonymous details
10/28/2009 - 16:51 RSS feed
rss.xml Anonymous details
10/28/2009 - 16:50 node Anonymous details
10/28/2009 - 16:50 node Anonymous details
10/28/2009 - 16:49 node Anonymous details
10/28/2009 - 16:49 Access log settings
admin/reports/settings renat details
10/28/2009 - 16:48 Administer
admin renat details
10/28/2009 - 16:48 node Anonymous details
10/28/2009 - 16:48 Media
press Anonymous details
10/28/2009 - 16:48 Site building
admin/build/sites/default/files ... renat detail

#14

drupal-id.com - October 28, 2009 - 23:16
Status:fixed» needs work

Try to execute http://domainname.tld/update.php and report to us again.

#15

deymos34 - October 29, 2009 - 05:19

There were no problems during update, but nothing changed, unfortunately.

#16

drupal-id.com - November 27, 2009 - 18:16

Please uninstall and install new version, Counter 6.x-2.3 and report the result. Thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.