Closed (fixed)
Project:
Token
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Oct 2007 at 16:03 UTC
Updated:
1 Dec 2007 at 03:42 UTC
We're using securesite.module and ldap_integration/ldapauth.module for authentication on our site. When a user logs in, they get the following error:
Fatal error: Call to undefined function token_get_values() in /home/qasap/www/blogs/sites/all/modules/pathauto/pathauto.inc on line 339
This occurs because ldapauth.module does a user_save with every login. user_save calls pathauto_user, which calls some token functions.
This is really an initialization problem. Securesite does authentication in securesite_init, which occurs before token_init, meaning token.inc hasn't been included and token_get_values isn't defined. Changing token.module's weight to -1 fixes this issue.
Comments
Comment #1
junyor commentedNote that disabling securesite.module will also solve this issue.
Comment #2
gregglespossible solutions:
1) set token module's weight to -1
2) refactor token.module and token.inc to move all of the token.inc functions into token.module token.inc isn't that big to make this a big improvement anyway
Comment #3
mgiffordI ran into this problem.. had to disable then enable the pathauto modules and then all worked fine. This was after an upgrade of the latest version of pathauto after the security release.
Think there are some other strange things that have been introduced by Pathauto 5.x-2.0.. Maybe it's just a config stuff that's changed though. Will have to look at that in greater depth.
Comment #4
eaton commentedMost of these problems appear to originate with the split between token.module and token.inc -- there are certain scenarios in which token.inc never gets included, and all hell breaks loose.
Greggles and I chatted about the issue and came to the conclusion that it makes sense to roll the .inc file in with the .module file, since there are no situations in which we DON'T want the .inc file's functions to be available. No release has been rolled yet, but the dev build of token should have the fix -- if you can take it for a spin, and see if it fixes the problem, that would rock. Thanks!
Comment #5
junyor commentedYes, that takes care of it!
Comment #6
gregglesCool.
Comment #7
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.