We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

v2 to v3 upgrade issue - exceptions caught

How Do I?

mgreich's avatar
mgreich
8 posts
8 years ago
mgreich's avatar mgreich

I’m having some issues doing an upgrade from 2.11 to 3.5. I’m seeing a couple exceptions (one for the admin and one for the index) when I run the updater.

Admin - [screenshot](https://www.dropbox.com/s/nf1a2yvm6r23kz8/Screenshot 2017-05-02 23.34.48.png?dl=0)

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1' for key 'PRIMARY':
INSERT INTO `exp_layout_publish_member_groups` (`layout_id`, `group_id`) VALUES (1, 1)

mysqli_connection.php:122

Index: [screenshot](https://www.dropbox.com/s/clsq7f0ci62767l/Screenshot 2017-05-02 23.35.33.png?dl=0)

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'can_debug' in 'field list':
SELECT `member_id`, `can_debug`, `admin_sess`, `last_activity`, `fingerprint`, `sess_start`, `login_state` FROM (`exp_sessions`) WHERE `session_id` = '1e32939f0aa601debd88dcf46c9656f291f36613'

mysqli_connection.php:122

I followed the upgrade instructions closely I believe. Not sure what’s going on here. Anyone have any ideas?

       
Green17's avatar
Green17
2 posts
7 years ago
Green17's avatar Green17

We are getting the same problem, you get a fix?

       
verveuster's avatar
verveuster
34 posts
6 years ago
verveuster's avatar verveuster

Hi Does anyone know what the problem was/is. We have the same error here. Thanks!

       
Robin Sowell's avatar
Robin Sowell
13,159 posts
6 years ago
Robin Sowell's avatar Robin Sowell

The first thing I’d do if I hit a mysql error that stops the upgrade is go look at the config.php file and see what version it shows you currently on. You know the update that’s breaking is the one in the NEXT version.

So if it shows $config[‘app_version’] = ‘3.0.1’; you know it completed all of the stuff in 3.0.1 and the break is happening in the next file.

Then I’d go look at the next file and see exactly what’s failing. If you’re upgrading to v3, that’s in system/ee/installer/updates/- the files are named for the version.

I don’t recognize those errors off hand, so you’d want to know the exact version file before digging in. The layout one may well be a case of some out of sync data- clearly the updater is trying to alter something related to layouts.

You may need to code it to skip over duplicates or some such. In which case, you might need to delete and then add back any layouts that couldn’t be updated. But once you find the code that’s running into a problem, it will be easier to understand the exact cause of the problem.

The can_debug issue happens because a column added in 3_03_00 doesn’t exist. If the current version is later than that, you know something went wrong and things were skipped. At that point, you need to change the version to where you know everything was good and then rerun the update.

If it’s happening BEFORE version 3.03.00, then what I would do is look at up_3_03_00.php, see what the field should look like, and add it manually.

So for me, that query would look something like:

ALTER TABLE exp_sessions ADD COLUMN `can_debug` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'n'
       
Green17's avatar
Green17
2 posts
6 years ago
Green17's avatar Green17

One of the times we had this problem it was down to having ‘Views’ setup in the database when we remove them the upgrade worked.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.