0

After an upgrade from 2.9.2 to 2.10.2 the site was working normally in the browser, and the system login page accepted credentials. After that was a white screen.

Turning on error logging in admin.php produced the following error:

A Database Error Occurred

Error Number: 1054

Unknown column 'login_state' in 'field list'

SELECT member_id, admin_sess, last_activity, fingerprint, sess_start, login_state FROM (exp_sessions) WHERE session_id = 'b0e0c13fd814f8ce72c88a242ac269705f9c5df5'

Filename: libraries/Session.php

Line Number: 731

The database table exp_update_log indicates successful update to v2.10.2

1 Answer 1

3

I located this line (found at 721) in /system/expressionengine/libraries/Session.php and removed login_state from the query - so from this:

ee()->db->select('member_id, admin_sess, last_activity, fingerprint, sess_start, login_state');

to this:

ee()->db->select('member_id, admin_sess, last_activity, fingerprint, sess_start'); // login_state

The control panel loaded up fine and all seems functional now.

I'm hoping this is just a bug in this particular upgrade path... Or should I run an SQL query to add this column to the exp_sessions database table?

3
  • Amazing! This was super helpful. I'm not sure what version of EE a client was running as they deleted their system folder....but I assume they were around EE 2.9 and I ran into this error when using the EE 2.11 files, so it's still a thing.
    – Chris B
    Jul 7, 2017 at 4:03
  • An added note that I had to manually restore the 'login_state' column in the 'exp_sessions' table (using PHPMyAdmin) when upgrading EE from v2 to v3. This was throwing an exception during the v3 upgrade process, but could be done after completion. To get the correct values for the column, refer to another working EE installation v3 or upwards. Apr 19, 2020 at 8:27
  • it is working for me. Thanks Feb 2, 2021 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.