I'm currently getting the following when my CAS server passes a service ticket back to the Drupal site:
[client 75.39.134.171] PHP Fatal error: Call to undefined function pathauto_get_placeholders() in SERVER_PATH/sites/all/modules/pathauto/pathauto.module on line 416, referer: https://sso.boomer.com/login?service=https%3A%2F%2Fbkn.boomer.com%2Fhome
What's happening is that CAS calls user_save() during cas_init() to update roles and randomize the user's password on login. This causes the 'update' hook to be called, which invokes pathauto_get_placeholders(), which is not yet defined as of cas_init() being called.
The problem with that is that pathauto.module doesn't load that module until pathauto_menu() is called. If I add the include_once() from there out to the top of the module, I solve this problem.
However, it still doesn't work because now it trips on:
[client 75.39.134.171] PHP Fatal error: Call to undefined function token_get_values() in SERVER_PATH/sites/all/modules/pathauto/pathauto.inc on line 271, referer: https://sso.boomer.com/login?service=https%3A%2F%2Fbkn.boomer.com%2Fhome
which defines token_get_values() in token.inc, which is loaded during token_init(). Again, if I add the include_once() to the top, I solve this problem.
That actually resolved all my problems. Now, this isn't really the CAS module's problem, but pathauto and token's. I'm going to report bugs on those projects, but I wanted to document it here for the benefit of those using CAS and running into similar problems.
Comments
Comment #1
zostay commentedIt looks like this shouldn't be a problem in the latest beta of pathauto as they've changed the way that the additional include files are loaded. However, the latest token release still seems to have this problem.
I've reported the problem to the Token module: http://drupal.org/node/179450
Comment #2
jdleonardI still receive the token_get_values() error using CAS 2.2, Token 1.9 and Pathauto 2.0-beta4. http://drupal.org/node/179450 suggests that the error is in the logic behind CAS's calling user_save() during cas_init().
Comment #3
jdleonardincluding token.inc does fix this problem (thanks!), but is quite a dirty hack.
Comment #4
jdleonardNote that this is no longer a problem if you use Pathauto 5.x-2.0 and Token >5.x-1.9 (5.x-1.x-dev).
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.