Fatal error: Call to undefined function user_access()

darumaki - June 19, 2008 - 20:52
Project:IE Destroyer
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Xano
Status:closed
Description

Fatal error: Call to undefined function user_access() in modules/iedestroyer/iedestroyer.module on line 378

I just notice this, it renders site unaccessible

#1

Xano - June 20, 2008 - 22:07
Priority:normal» critical
Status:active» postponed (maintainer needs more info)

Could you please specify the steps necessary to reproduce this error?

#2

darumaki - June 22, 2008 - 06:47

When enabled and not logged in as admin, site goes blank and fatal error appears, I do not see it when logged in as Admin, only when logged out,

#3

Xano - June 24, 2008 - 12:27
Assigned to:Anonymous» Xano
Status:postponed (maintainer needs more info)» active

#4

Xano - June 24, 2008 - 15:37
Status:active» postponed (maintainer needs more info)

I'm not able to reproduce this error. I have tried using FF3/Mac and IE6/Win, both logged in and logged out. Besides that it's as far as I know impossible to get this error, because user_access() is part of user module which is a required core component.

#5

darumaki - June 28, 2008 - 20:33

Using Safari browser but I also found it in FF3 mac, wonder what it could be

#6

Xano - June 28, 2008 - 20:38

I don't see the error when using Safari either. Have you tried a clean module install or perhaps even a clean Drupal install already?

#7

darumaki - June 28, 2008 - 22:54

I've done a clean module install but not a drupal install, I am hoping it won't come to that, it will be a pain to import all the data again. I'll try doing another clean module install and see. I didn't have this problem before iedestroyer maybe its another module causing the trouble.

update: still not working, guess I'll have to reinstall a fresh drupal, would this have anything to do with the user access ? I'm guessing view iedestroyer is if you want them to see the banner correct ?

This doesn't make sense because as admin, everything works and the error message does not appear, only when logged out. Strange how the problem goes away after disable module

#8

Xano - June 28, 2008 - 23:44

You won't have to delete your old data to do a clean Drupal installation. If you don't have an extra database for testing purposes you can set a table prefix during the installation wizard so the new install won't interfere with your old one.

[edit]
Users in roles without the 'view iedestroyer' permission will indeed not see IE Destroyer even if they're using Internet Explorer. I have tried to reproduce this error by taking away this permission from anonymous users and to visit my test site as one, but I'm still not seeing anything going wrong.
[/edit]

#9

darumaki - June 29, 2008 - 00:26

I did a fresh Drupal install and found no error, I also enabled all the modules i was using and everything is ok, does this mean something in my server database is broke ?

#10

Xano - June 29, 2008 - 00:34
Status:postponed (maintainer needs more info)» won't fix

I really don't know, I'm sorry.

To update your old installation you might want to re-install every contributed module one by one to see if the error disappears. I'm talking about uninstalling and installing them, not disabling and enabling. Take great caution with this! Uninstalling modules like CCK may cause data loss, because they store data in their own tables. If you don't know how to do this properly I suggest you go to the forums and ask for more extensive help there.

Good luck!

#11

darumaki - June 29, 2008 - 12:27

I just did a clean install and this module has to have some issue with it, it's the only one that produces the error message, I give up, it's unusable on my end, not sure why. I did everything right, started fresh and it still produces the fatal error.

#12

Xano - June 29, 2008 - 13:26
Status:won't fix» postponed (maintainer needs more info)

You mean you now get the error again after all?

#13

darumaki - June 29, 2008 - 18:03

Ok I think I figured it out, thought I was losing my mind, the issue goes away when I turn off page cache, not sure what that has to do with a fatal error. I've been able to replicate it by turning on and off page cache.

#14

Xano - June 29, 2008 - 19:26

You're not the only one having this problem. I asked a friend of mine to check this out this afternoon and he got exactly the same error as you did. I'll dig a little further and see if I can find the problem.

#15

darumaki - June 29, 2008 - 20:30

I managed to find a work around and enabled the cache exclude module, I then set the iedestroyer to show up on front page only, and excluded front page with cache exclude then turned on page cache, this works.

#16

Xano - July 24, 2008 - 20:40
Status:postponed (maintainer needs more info)» active

I have been able to reproduce this problem: enable IE Destroyer and go to /?q=admin/settings/performance and enable page caching.

To prevent this problem, don't enable caching. I am now looking for a fix.

#17

Xano - July 27, 2008 - 18:43
Status:active» fixed

I have fixed the problem by writing a custom version of user_access(). It can be found in iedestroyer.module as iedestroyer_view_access() for those who want to check it out.

Fixed and committed to 5.x-1.x-dev.

#18

Anonymous (not verified) - August 10, 2008 - 18:53
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.