nystudio107 / craft-retour

Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website
https://nystudio107.com/plugins/retour
Other
38 stars 26 forks source link

3.1.32 migration error #94

Closed johndwells closed 4 years ago

johndwells commented 4 years ago

I'm running Craft 3.3.19 and when attempting to update Retour from 3.1.31 to 3.1.32, I get the following error:

Database Exception: SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'redirectSrcUrl' used in key specification without a key length
The SQL being executed was: ALTER TABLE craft_retour_redirects ADD INDEX craft_retour_redirects_redirectSrcUrl_idx (redirectSrcUrl)

FWIW I'm using MariaDB 10.2. Let me know if you need any more info, I can provide stack trace if necessary.

jmcgaha commented 4 years ago

Also seeing the same thing upgrading from 31->32 on my local environment (MAMP, php 7.2, mysql 5.7).

johndwells commented 4 years ago

Hmm so I just happened to try this on another build, and didn't get an error...

So I looked and for some reason on this build with the issue, my redirectSrcUrl column type is TEXT, whereas in the other it's VARCHAR(255).

I'm not seeing anything in the migrations that would show this column type having been changed... if I recall, this build was originally on Craft2, and was migrated to C3. I wonder if that's a clue?

jmcgaha commented 4 years ago

Oooo, mine was also a Craft 2->3 upgrade.

cherrykoda commented 4 years ago

seomatic-error.txt

Server - Ubuntu - MariaDB - PHP 7.0

Mine just started happening on a Craft 3 site after running composer update. Rolling back until we know whats up. The site was a Craft 2 site that was migrated to Craft 3 about a month ago, but I havent had upgrade issues until now.

khalwat commented 4 years ago

Sounds like this is only happening with Craft 2 sites that were migrated to Craft 3, and somehow that column isn't set to what it should be.

khalwat commented 4 years ago

Fixed in 3.1.33 -- sorry about that -> https://github.com/nystudio107/craft-retour/releases/tag/3.1.33