After upgrade to 2.1, can't login

After upgrade to 2.1, can't login

by Kevin Buikema -
Number of replies: 3

I just upgraded a copy of our live site from 1.9.10+ to 2.1+, and although it initially left me logged in, once I reopened the browser, it wouldn't allow me (or anyone) to login again. I followed all the defaults for settings on upgrade, and deleted all mods/blocks that were incompatible with 2.1 prior to completing the upgrade.

Here is the error: Error writing to database

Stack trace:

Debug info:
Stack trace:
  • line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 984 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1016 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
  • line 3358 of /lib/moodlelib.php: call to mysqli_native_moodle_database->update_record()
  • line 3583 of /lib/moodlelib.php: call to update_user_record()
  • line 133 of /login/index.php: call to authenticate_user_login()

 

Average of ratings: -
In reply to Kevin Buikema

Re: After upgrade to 2.1, can't login

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Did you upgrade to 2.0 first (like the release notes suggest) and, if you did, did that work ok?

Is this manual auth or some external method? The only way you get to where the error occurred is if the user does not exist in Moodle but is authenticated by an enabled auth plugin. It then tried to create the new profile which is where it is failing.

Regardless, find the installation faq in the docs and work through the "I can't login" points - if nothing else to eliminate them.

http://docs.moodle.org/20/en/Installation_FAQ#I_can.27t_log_in_-_I_just_stay_stuck_on_the_login_screen

Let us know how you get on!!
In reply to Howard Miller

Re: After upgrade to 2.1, can't login

by Kevin Buikema -

Tried going right from 1.9+ to 2.1+, so I'll try again with 1.9 to 2.0 first and see what happens.

I'll also re-enable the manual admin user before upgrading so I can verify that the LDAP didn't get borked.

Thanks for the ideas.

In reply to Kevin Buikema

Re: After upgrade to 2.1, can't login

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
As a general point - your primary admin should *always* be a manual user. Otherwise, this sort of thing happens one day wink