rkingon / Craft-Plugin--Redirect-Manager

MIT License
46 stars 16 forks source link

Issue updating to 1.9.1 from Beta #25

Open tehatjamberry opened 8 years ago

tehatjamberry commented 8 years ago

At some point from BETA to 1.9.1 the Plugin Class name in the DB changed from Redirectmanager to the proper class name RedirectManager. Seems that strict MySQL DB rules causes this to break the relationship with the plugin.

When I updated to 1.9.1 it never ran a db update and broke the plugin until I figured out and manually changed the Class Name in the Plugins table to reflect the proper class name of the plugin.

Would a db migration be missing to resolve this upgrade issue?

Workaround: One could run an uninstall and reinstall but since I had over 30 plus rules in the plugin that wasn't a suitable option.

rkingon commented 8 years ago

I thought I did write a migration for that. Weird.

I've got a bit too much going on right now to dig in, but I'll set a reminder in about a week to take a look.

Thanks for the heads up

tehatjamberry commented 8 years ago

Cool thank you!

tehatjamberry commented 8 years ago

Unrelated question... in the RedirectMangerPlugin file on line #38. Can you explain how the exception function works? Is it designed so that it will only init() the redirect if the request is not a valid request or the request throws an exception? Am I reading that right?

https://github.com/rkingon/Craft-Plugin--Redirect-Manager/blob/master/redirectmanager/RedirectManagerPlugin.php#L38

rkingon commented 8 years ago

yea pretty much. it's so that way it only init's if there is a 404.. otherwise you would be making sql calls on every request

tehatjamberry commented 8 years ago

Thanks. Makes complete sense.