First apptempt to use the D7 code:

 SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'series' at row 1: INSERT INTO {persistent_login} (uid, series, token, expires) VALUES (:uid, :series, :token, :expires); Array#012(#012    [:uid] => 2195#012    [:series] => OTFeyJykYwR8S_GmeaLjN8oRxSxqDiuB6EVxaDWdsIY#012    [:token] => OP9-RpMA_HjzQqJvF-EZNQZ7LD0lzzooXGbvn6ZVBwo#012    [:expires] => 1338641331#012)#012 in _persistent_login_create_cookie() (line 468 of modules/persistent_login/persistent_login.module

Hmm. This site was upgraded from D6.
So uninstalled the module to delete all old tables, then re-enabled the module.
The above errors disappeared.
The above is more an FYI, I probably have the modules enabled when doing "drush updatedb" or so. Sorry.

Also: the menu admin/config/system/persistent_login should probably be moved to Configuration People, and a link to that path added in the info file?

Comments

gapple’s picture

Title: Sql errors » Sql errors after d6 -> d7 upgrade
Category: support » bug

thank you for the bug report. Fortunately persistent login doesn't store any essential data, so there isn't any loss with uninstalling and re-installing it, but I would still like to track this down.

I assume the error occured when using the site after the upgrade?
Do you remember if any errors occured with the upgrade, or check if the upgrade hooks were not run afterwards?
Was the database structure changed at all from the d6 version?

gapple’s picture

I have opened a new issue to deal with the config path in .info

#1562072: add configuration path to info file

boran’s picture

I disabled the module, upgraded the site. And sometime later enabled the module. Probably the mistake made was not having the module enabled during the upgrade, or not running the update after installing it.

nocean’s picture

I also experienced this, identical workflow to Boran, and can confirm that uninstalling and reinstalling the module seems to have solved the problem.

-DBD

gapple’s picture

Status: Active » Closed (works as designed)

It looks like the issue is likely just that the database updates for persistent login were not run after upgrade.

The site status report should indicate that database updates need to be run, and I confirmed that the update hook correctly modifies the table structure.

The pl token I had saved in the database didn't seem to correctly let the user in after the upgrade, but I don't think preserving token validity across the upgrade is necessary, or the effort worthwhile.

fenstrat’s picture

@gapple I've updated a few sites using persistent_login from D6 to D7, the upgrade worked fine. This issue does indeed look like the db updates were not run.

Agreed that preserving the token validity during the upgrade is not worth the effort.