Download & Extend

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

Project:Droplist Filter
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:jchan
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Assigned to:Anonymous» jchan

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

#2

Good!

#3

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

Status:fixed» closed (fixed)

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

#5

Status:closed (fixed)» postponed (maintainer needs more info)

how can i disable caching using phpmyadmin?

#6

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

#7

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

#8

Status:postponed (maintainer needs more info)» closed (fixed)

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

nobody click here