0

During the update from 2.0 to 3.5.17 the update keeps stopping at this point:

Oops, there was an error An unexpected error occurred while performing the update Please correct the avatar path in your config file. Please see 3.1.0 version notes. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Mijheer.png' for key 'unq_folder_id__file_name': ALTER TABLE exp_assets_files CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

I have added the path to the avatar, but I can't solve the other lines. Hope someone can help me.

0

that looks like there's something amiss with the upload folders. Would have to be able to see the setup to diagnose

| improve this answer | |
  • thanks for your quick reply. The images directory and the avatars directory are both set on 755. Do I need to change more, or other things? – Buzzard Apr 23 at 8:24
  • No it's not a rights issue. The error says that the paths are incorrectly defined. Where are those paths defined? do you use a standard config file or something like focus lab master config? – Jelle Dijkstra Apr 23 at 8:33
0

It seems unlikely that your avatar path is the actual issue. Please read into your constraint violation.

1062 Duplicate entry '1-Mijheer.png' for key 'unq_folder_id__file_name': ALTER TABLE exp_assets_files CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

You appear to be using the Assets add-on. The point where you are stopped in the upgrade is an update script that is running an ALTER on all tables in your database, which fails when it reaches that Assets table:

ALTER TABLE exp_assets_files CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci

It fails due to the constraint. You have an integrity issue to sort out in that table clearly. That assets table has a UNIQUE index based on the folder_id and file_name columns. You most likely have two (or more) rows in that table that have matching folder_id and file_name (which creates the index value, folder_id being 1 and file_name being Mijheer.png).

You probably just have to query that table possibly like this:

SELECT * FROM 
    exp_assets_files
    WHERE folder_id = 1
    AND file_name LIKE "%Mijheer.png%";

And remove duplicate rows at your own discretion.

Do not do this without a secure backup of your database, and understand that removing rows from that table may result in incomplete records you'll have to repair after your upgrade

You might even be able to just run an Assets re-index before running the upgrade and that might fix it. Just try that anyways before your next upgrade attempt. Worth a shot.

| improve this answer | |
  • Thanks Jrothafer, I had to empty the whole table, but at least I could move on with the install. After finishing the update now this error comes up: Exception Caught No such property: 'session' on EllisLab\ExpressionEngine\Legacy\Facade ee/EllisLab/ExpressionEngine/Legacy/Facade.php:107 – Buzzard Apr 23 at 12:52
  • expressionengine.com/forums/topic/248316/error-when-updating Indicates to me that you have an extension that is incompatible with EE3. If you have a stack trace you can figure out which extension; the other option is to disable all extensions via the config file or DB and turn them on one by one if you don't know which one is causing it. – jrothafer Apr 24 at 3:35
  • @Buzzard did you see my comment? – jrothafer Apr 25 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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