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

Comments

catorghans’s picture

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

syngi’s picture

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?)

moshe weitzman’s picture

Status: Needs review » Fixed

committed to 5

moshe weitzman’s picture

Status: Fixed » Active

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

bjaspan’s picture

Status: Active » Fixed

Fixed in HEAD. Thanks saul11 and Moshe!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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