Hi there.
I see this on the bottom of my site when not logged into the site:
Fatal error: Call to undefined function user_access() in /home/[siteroot]/public_html/sites/all/modules/visitors/visitors.module on line 233
Conditions:
IE7 (haven't tested FireFox)
Front Page / Other pages
Not Logged in
Configuration:
Drupal 6.10; Caching=Normal; Other caching off; Visitors enabled for an admin-type role
Tapestry Theme
Visitors 6 0.17
Comments
Comment #1
gashev commentedFunction http://api.drupal.org/api/function/user_access/6 is defined in modules/user/user.module (http://api.drupal.org/api/file/modules/user/user.module/6/source). Either this file is missing, or perhaps it was missing and as a result has been disabled in the {system} table in the DB. The value of status should be 1.
"undefined function user_access()" means that Drupal
- either didn't find the user.module file at the place where it should be (under /modules/user/)
- or it couldn't read it (because it was damaged, or because its permissions were less than 644, or because the permissions of it directory were less that 755, or for some other reason).
Comment #2
gashev commentedComment #3
SiteMaster.ServeLime.com commentedApologies for only now checking back.
I checked the user right on the folder - both match your settings
I only get this issue in IE (7)
Comment #4
timpiche commentedI get the same error with the newest stable release of this module. I am running Drupal 6.13 and the permissions on the folder and files are correct (Folder 755, file 644).
Comment #5
gashev commentedI cannot reproduce it.
What's your previous version visitors module?
Comment #6
timpiche commentedThis was a new install for me. I did not have any previous version of this module installed.
Comment #7
gashev commentedExecute sql query: show create table visitors.
What is your modules list?
Comment #8
dave reidDrupal still fires hook_exit() even on cached requests. In visitors.module:
If this is a cached request, and hence not a full bootstrap, the user.module is not loaded and user_access() is undefined.
Steps to reproduce:
1. Turn on page caching & use visitor.module defaults
2. Log out
3. View a page more than once
4. See undefined function error
Comment #9
gashev commentedComment #11
gashev commentedFixed to 6.x-0.22.
Comment #13
polStill the same error on 6.x-0.29
Comment #14
rkodrupal commentedconfirming Pol's report ... still a problem with version 6x.029.
Comment #15
gashev commentedComment #16
poehnix commentedConfirmed Pol's and rkodrupal reports: Error is still in php site logs. Any news on this issue?
Error in line 267 file visitors.module
Comment #17
gashev commentedFixed to 6.x-0.30.
Comment #18
poehnix commentedI will test it and report as soon as I can
Thanks
poehnix
BTW I was just reviewing the cvs messages in file "visitors.install" is there a chance that you misspelled the translation string you have just added --> st() instead of t() in line 14 ?
Comment #19
gashev commented> BTW I was just reviewing the cvs messages in file "visitors.install" is there a chance that you misspelled the translation string you have just added --> st() instead of t() in line 14 ?
No.
http://api.drupal.org/api/function/st/6
Hardcoded function for doing the equivalent of t() during the install process, when database, theme, and localization system is possibly not yet available.
Comment #20
poehnix commentedI confirm the issue has disappeared.
Sorry for thinking of a typo. I should have checked drupal api first before reporting. Thanks for this excellent module.
I am opening another thread to report another issue I met while looking into this and sharing a translation file (to be reviewed because probably it is based on an old pot file.
bye
poehnix
Comment #21
gashev commented