Call to undefined function: user_access() error for anonymous user

yngvewb - September 18, 2008 - 13:28
Project:Droplist Filter
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:jchan
Status:closed
Description

When trying to use Droplist filter for an anonymous user (ie create a node) I get this error:

Fatalerror: Call to undefined function: user_access() in ...sites/all/modules/droplist_filter/droplist_filter.module on line 134

It works perfectly for authorized users.

#1

jchan - September 20, 2008 - 20:13
Assigned to:Anonymous» jchan

Seems like this happens only when caching is turned on. Will try to figure something out.

#2

yngvewb - September 22, 2008 - 09:03

Good!

#3

jchan - September 26, 2008 - 04:38
Status:active» fixed

This should be fixed now in 5.x-1.3. The problem was that when caching is enabled, not all the Drupal API functions are available during hook_init(). Solved it by running the code during hook_menu() instead.

Thank you yngvewb, for finding the bug.

#4

Anonymous (not verified) - October 10, 2008 - 04:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#5

blockedmind - December 22, 2008 - 23:05
Status:closed» postponed (maintainer needs more info)

how can i disable caching using phpmyadmin?

#6

jchan - December 23, 2008 - 00:58

You don't need to do that. Just log in to Drupal as an admin, and go to:
Administer > Site configuration > Performance

#7

blockedmind - December 30, 2008 - 19:42

i did not ask what i need not. how can i disable caching using phpmyadmin?

#8

jchan - January 1, 2009 - 20:48
Status:postponed (maintainer needs more info)» closed

blockedmind, what you are asking is outside the scope of Droplist Filter. I'm sorry that I cannot help you.

 
 

Drupal is a registered trademark of Dries Buytaert.