Whenever I try to add a new user role I get this error:

Fatal error: Call to undefined function: drupal_valid_token() in /home/xumzyrxk/public_html/modules/user.module on line 1908

I recently added/enabled Simple Access Module.

any thoughts?

-Chris

Comments

Darrell’s picture

It's not Simple Access Module. I get the following when trying to add a new user role since upgrading to 4.7.4.

Fatal error: Call to undefined function: drupal_valid_token() in /hsphere/local/home/me/mysite.com/member/modules/user.module on line 1908

The same install on another server works so it must be a server setting but I sure don't know what it is.

Please help.

I replaced user.module with the user.module from 4.7.3 and it worked to add a user role. When I put the 4.7.4 version back the role was there and I can do everything except add a role or edit a role.

hubris’s picture

I'll have to try that to create the roles. May also try a 4.7.5 upgrade to see if that also solves the problem.

I was getting the 'Call to Undefined function...' also, then I looked up 'drupal-valid-token()' on api.drupal.org. I copied and pasted the code into my includes/common.inc (it wasn't in there already) - and that's when the error changed from the undefined function to the validation error.

I'm wondering if it's the md5 hash that's used.. I know that's a php extension that can be turned on/off on the server...

I'll report back if I find something that works.

-Chris

heine’s picture

Really, redo the upgrade ASAP! Make sure to delete the old Drupal core files (all of them) during the upgrade procedure, then upload / unpack the 4.7.5 files from the archive.

You most likely have a Chimera on your hands; part 4.7.4, part 4.7.3; lots of brokenness, totally insecure.

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

Darrell’s picture

The clean install of 7.4.5 fixed the problem.

Thank you.

heine’s picture

Sounds like an incomplete upgrade. Make sure to remove all old Drupal core files (don't forget includes/!) when upgrading.

You can take a look at $Id$ lines to confirm this suspicion:

4.7.4 includes/common.inc should have the following ID:

// $Id: common.inc,v 1.537.2.14 2006/10/18 20:14:42 killes Exp $

4.7.3 includes/common.inc has the ID:

// $Id: common.inc,v 1.537.2.6 2006/07/18 10:46:23 unconed Exp $

When you reattempt the upgrade, go for 4.7.5.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.