Enabling the module bails out the following error message on our 6.2 system:

Invalid argument supplied for foreach() in /somewhere/htdocs/includes/common.inc on line 3085

As it seems, the tables were not created. After trying to use the "remember_me" function in a login form I get:

Table 'foo.persistent_login' doesn't exist query: INSERT INTO persistent_login (uid, series, token, expires, valid, why) VALUES (1, '354ac54ba5a5724f6d4b0f4fc46362bd', '1c4a5e74981c87ca53cb60b4996dd80e', 1213701730, 1, 'issue') in /somewhere/htdocs/sites/all/modules/persistent_login/persistent_login.module on line 441.

I've follwing modules installed

  Name                          Installed version       Recommended version     Status
  ----                          -----------------       -------------------     ------
  Active menus                  6.x-1.x-dev             6.x-1.x-dev             OK
  Drupal                        6.2                     6.2                     OK
  Avatar Selection              6.x-1.3                 6.x-1.3                 OK
  CAPTCHA                       6.x-1.0-rc2             6.x-1.0-rc2             OK
  Contact Forms                 6.x-1.1                 6.x-1.1                 OK
  drush                         6.x-1.0-rc1             6.x-1.0-rc1             OK
  External Links                6.x-1.6                 6.x-1.6                 OK
  Google Analytics              6.x-1.0                 6.x-1.0                 OK
  Image                         6.x-1.0-alpha1          6.x-1.0-alpha1          OK
  Image Assist                  6.x-1.0-beta1           6.x-1.0-beta1           OK
  Javascript Tools              6.x-1.0                 6.x-1.0                 OK
  Lightbox2                     6.x-1.6                 6.x-1.6                 OK
  Nice Menus                    6.x-1.1                 6.x-1.1                 OK
  Meta tags                     6.x-1.0-rc1             6.x-1.0-rc1             OK
  Pathauto                      6.x-1.0                 6.x-1.0                 OK
  Poormanscron                  6.x-1.0                 6.x-1.0                 OK
  Profile Plus                  6.x-1.x-dev             6.x-1.x-dev             OK
  reCAPTCHA                     6.x-1.0                 6.x-1.0                 OK
  TinyMCE WYSIWYG Editor        6.x-1.1-dev             6.x-1.1-dev             OK
  Token                         6.x-1.10                6.x-1.10                OK
  Views                         6.x-2.0-beta2           6.x-2.0-beta2           OK

Let me know if I can provide you with any other useful information to help you solve this issue.

Cheers!
Paul.

Comments

bjaspan’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry for the delay in responding.

Unless you can reproduce this, I'm going to assume that some other problem occurred while you were installing Persistent Login. PL uses the Schema API to create it tables so it does exactly the same thing every other module does.

pulsar’s picture

Yes, I can still reproduce it - exactly as described above. Don't have any similar problems installing other modules, only PL seems to be failing. Running Drupal 6.6, module installed via drush.

Perhaps something is wrong with the schema structure? The corresponding drupal api call would be:

3183 function _drupal_initialize_schema($module, &$schema) {
3184   // Set the name and module key for all tables.
3185   foreach ($schema as $name => $table) {

Feel free to to contact me on skype (pulsar), icq (1177279) or ircnet (#bluephod) if you would like to take a closer look. I think this one can be fixed in no time.

Cheers!
Paul.

pulsar’s picture

found and fixed.

for some reason (is it supposed to work this way?) the persistent_login.schema file isn't loaded during the installation. Just move the function persistent_login_schema() { .... } schema definition into the persistent_login.install file and the worries are gone.

Cheers!
Paul.

markus_petrux’s picture

Status: Postponed (maintainer needs more info) » Fixed

This problem was fixed a while ago. 6.x-1.4-beta4 has hook_schema() implementation already placed in the .install file.

pulsar’s picture

Status: Fixed » Closed (fixed)

OK, blame me then. It appears, I've been running the stable release - which I always prefer if there is any available. Sorry for wasting your time.

bardzodziwny’s picture

Could you do a special fix of it on 1.3 or mark 1.3 as unstable?
Cause the same issue arizes in the (theoretically) stable release 1.3 and it just wasted 4 hours of my DrupalNoob day (resolved it by myself before ranting here).