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.
Comments
Comment #1
drupalnesia commentedI 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.
Comment #2
dave reidUm...the query is not even using the {node} table. That's why this is failing.
Comment #3
dave reidI'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.
Comment #4
dave reidConfirmed 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.
Comment #5
drupalnesia commented@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.
Comment #6
drupalnesia commentedI 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.
Comment #7
xecstasyx commentedi 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.Comment #8
drupalnesia commented@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
Comment #9
xecstasyx commentedheres 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
Comment #10
renat commentedI 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.
Comment #11
drupalnesia commentedI 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.
Comment #12
drupalnesia commentedBug 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.
Comment #13
renat commentedThank 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
Comment #14
drupalnesia commentedTry to execute http://domainname.tld/update.php and report to us again.
Comment #15
renat commentedThere were no problems during update, but nothing changed, unfortunately.
Comment #16
drupalnesia commentedPlease uninstall and install new version, Counter 6.x-2.3 and report the result. Thanks.
Comment #17
renat commentedUnfortunately, situation is still the same. There were no problems during Counter 6.x-2.3 installation, but I can see only the same data, as I published in message #13. Anyway, thank you for your work! Maybe I should check something to better understand the origins of this problem?
Comment #18
renat commentedHappy New Year to all of you!
I tested new Counter 6.x-2.4 with new Drupal 6.15 and new Internationalisation module, 6.x-1.2. But situation is still the same...
Comment #19
drupalnesia commentedHi deymos34:
Look like some variables caused this error. Please try at least 6.x-2.9, I have fix several bugs.
Please test and reported again.
Comment #20
drupalnesia commentedDrupal will not process any blank result block, so "Show Site Counter result for administer group only" has removed thus this issue automatically fix.