Fatal error

HallSL - July 3, 2008 - 18:44
Project:Persistent Login
Version:5.x-1.4-beta2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I installed persistent login on a site and was able to use it fine as user 1. There are two other users and when they clicked the remember me box, logged in, closed their browsers and came back, they received a fatal error:

Fatal error: Call to undefined function: drupal_get_path_alias() in /home/xxxxx/public_html/includes/common.inc on line 1188

They were able to reach other pages on the site, but not able to get to the frontpage of the site, the one that should have offered the message welcome back.

Another odd phenomenon was that while the module was on, who's online reported multiple instances of each of these users.

System info:

Drupal 5.5
MySQL database 4.1.22
PHP 4.4.8

#1

catorghans - July 17, 2008 - 06:57

I can confirm this problem. For me it is a critical problem, Remember Me option is not about chasing visitors away,

#2

saul11 - October 8, 2008 - 10:01
Status:active» needs review

I had this problem too and think that I was able to fix it. I believe it's due to 'drupal_goto' in '_persistent_login_check' which (if you check 'includes/common.inc') uses the function 'url' that throwing the error "drupal_get_path_alias() in /includes/common.inc on line 1188".

The function 'drupal_get_path_alias' is in '/includes/path.inc', so I added " require_once './includes/path.inc';" on line 292, giving:

    // now, any outcome requires this
    require_once './includes/common.inc';
    require_once './includes/path.inc';
    require_once './includes/theme.inc';

This seems to have fixed it for me!

(The thread http://drupal.org/node/119009 seems related, although another module, but I think loading one specific file is better than bootstrapping. Or is drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH) only loading path.inc?)

#3

moshe weitzman - October 10, 2008 - 15:46
Status:needs review» fixed

committed to 5

#4

moshe weitzman - October 10, 2008 - 19:04
Status:fixed» active

committed to D5. leaving it open for 6 in case is needed there as well.

#5

bjaspan - October 28, 2008 - 17:16
Status:active» fixed

Fixed in HEAD. Thanks saul11 and Moshe!

#6

Anonymous (not verified) - November 11, 2008 - 17:16
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.