nystudio107 / retour

DEPRECATED Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website.
Other
168 stars 24 forks source link

Installing 1.0.22 plugin leads to error #92

Closed nilsnh closed 6 years ago

nilsnh commented 6 years ago

Hi there,

I'm on Craft CMS 2.6.2997 and tried to install this plugin version 1.0.22 but I ran into this error:

CDbCommand could not execute SQL expression: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

Returning to the plugin screen and refreshing I saw that the plugin had been activated. But I'll try with an earlier version and see if that also triggers an error.

nilsnh commented 6 years ago

I tried again after updating Craft to 2.6.3000

Here is more of that error. 🤔

CDbCommand klarte ikke å eksekvere SQL uttrykk: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint. The SQL statement executed was: ALTER TABLE `craft_retour_redirects` ADD CONSTRAINT `craft_retour_redirects_locale_fk` FOREIGN KEY (`locale`) REFERENCES `craft_locales` (`locale`) ON DELETE CASCADE ON UPDATE CASCADE 
nilsnh commented 6 years ago

My bad. After much investigation I found that we had utf8_swedish_ci collation on our tables. After setting default collation to utf8_swedish_ci in our db.php retour installed correctly. 👍