-
Notifications
You must be signed in to change notification settings - Fork 76
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated references from Leafo to ScssPhp cause Fatal error - Version 2.0.0 #157
Comments
Thanks @kinsky-org, you saved my 🍑 ! I have the 2.0 version installed at 10 sites and only one was broken. Maybe the broken value helps.
|
@kinsky-org Thank you for pointing this out and providing a hotfix. Now I see how the plugin is still falling back to a DB value that may be the |
@kinsky-org here is what I'm thinking for a quick fix. It will read correctly but allows Leafo to stay in DB. so not ideal but would stop this error taking down a website. |
Version 2.0.1 has been updated to WP plugins. Leaving open for now in case others are on 2.0.0 and need a quick fix before updating. |
@shadoath Yep, that's exactly what I would do as a hotfix if my Adminer wasn't already connected and going through the options table (I was updating a client's website after years of no maintenance and many of those 10+ plugins were erroring much worse) which allowed me to fix it in almost no time with a simple SQL query. It also makes me remember the times when we were working on one hobby project (online multiplayer game) in C# and we needed to save every bit of information like twice per hour and load it every time the server went down and got running again. That brought a lot of errors like this one because people were always adding and removing variables like crazy and sometimes even reverting code to previous version so we needed to solve that for almost every single class. We used a version number for every class (same as you here with that constant) which was loading something - so we added some comparisons to the save and load routines - loading the version number first to choose which other variables should be assigned, modified and removed/deprecated ( I wonder if such solution would be appropriate, but I think it would be best if it's implemented on "higher level" with some support in WP core. I guess someone was already thinking about this problem as I see in add_option:
If I'm not mistaken it might be totally possible - if there was just one additional filter hook or something like that - to deprecate or "redirect" options more easily and maybe even remove the old clutter from database. Anyway - thanks a lot for such a fast reaction with even an update to WP plugins - probably saving some people from headaches! |
@kinsky-org good links to review, thanks for listing them out here. My apologies for the typo in your name (was a bit early this morning when I was making the update (now corrected). I like the idea for the update routine the best. Something to dig into more later. |
Hi there! Just spotted an issue after the upgrade to WP-SCSS@v2.0.0.
#156 and changing the vendor prefixes from "Leafo" in option keys (qualified class names) in commit 9b7bc1b5d8250580be585cdb1525239ee7ecca1d can cause following consequences:
If anyone needs it hotfixed it might be done ie. by changing the old
option_value
inwp_options
in the database (option_name
='wpscss_options' andoption_value
LIKE '%Leafo\ScssPhp\Formatter%' =>option_value
should be changed to 'ScssPhp\ScssPhp\Formatter') or using a filter hook "option_wpscss_options" etc.Thanks for this plugin and for all your work. I'm sorry I can't help more at the moment, just have to deal with something else too.
The text was updated successfully, but these errors were encountered: