Call to undefined function user_access with cache activated for anonymous users
z.stolar - March 13, 2008 - 11:08
| Project: | Localization client |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Whenever cache is activated, I get a call to undefined function user_access in line 42, which is the hook_init implementation of the module.
a. Is there any chance this function is not available when hook_init is called with cache enabled?
b. The problem occurs in every second visit on a page, as anonymous. With Cache off - no problem.

#1
Changing the title to be more exact
#2
Hm, well, user_access() is from user module, and it is most probably not loaded on cached pages, so this looks like a valid problem. We can disallow l10n_client for cached pages (ie. when user_access() is not available). What do you think?
#3
well, most chances are that translations are made by authenticated users anyway, so if cached pages are only served to anonymous users, this shouldn't harm anyone.
#4
Latest Drupal-5 CVS version seem to have it fixed.
#5
I get the same error in Drupal 5.7.
#6
Latest Drupal-5 CVS version seem to have it fixed.
This is true, but the fix is from Dec 2007, and the latest release is from Oct 2007. The only way to get this fix is to use the dev version. I recommend making a new release to get this (and other) bug fixes in.
This bug is a critical bug (it BLOCKS any anonymous access to a site with CACHE enabled - quite a common setup), that have been in the official release for nearly 10 months.
#7
Automatically closed -- issue fixed for two weeks with no activity.