ConnectThink / WP-SCSS

Wordpress Plugin that compiles sass using scssphp
http://wordpress.org/plugins/wp-scss/
248 stars 76 forks source link

Error with 3.0 Update: Uncaught Error: Class "ScssPhp\ScssPhp\Block\MediaBlock" #630 #239

Closed zoladesigners closed 1 year ago

zoladesigners commented 1 year ago

Upon updating the plugin to version 3.0.0 I get this error and the site is completely blown up:

Fatal error: Uncaught Error: Class "ScssPhp\ScssPhp\Block\MediaBlock" not found in /Users/zolamedia/Local Sites/zola-blocks-theme/app/public/wp-content/plugins/wp-scss/scssphp/src/Parser.php on line 477

The site is running PHP 8.0, Wordpress Version 6.1.1

Downgrading to 2.4.0 fixed the issue right away. Any other details that might be helpful just let me know, thanks!

lakuapik commented 1 year ago

duplicate of #238

KustomKode commented 1 year ago

THIS IS A SUPER SIMPLE FIX

Although it shouldn't have been released before being tested for quality assurance, accidents happen, luckily as a developer who has had many accidents in my career, I have become pretty good at troubleshooting.

The simplest fix is to FTP into your site and go to the "scss" plugin folder, open it and delete the entire folder named "scssphp" and replace it with a new folder of the same name and put the files from https://github.com/scssphp/scssphp/ inside of it. It takes less than 60 seconds to fix.

And if you haven't updated to version 3.0 on a site yet, just don't update it until there is a version released with a version number greater than 3.0. Problem solved.

nbaudet commented 1 year ago

Hey guys, The same issue happened to me on production. I created a PR with @KustomKode's proposition: https://github.com/ConnectThink/WP-SCSS/pull/240 which worked well in my case. I would be glad if you could give it some love @shadoath and @fabarea.

shadoath commented 1 year ago

@KustomKode thank you for pointing out the fix, and even greater thanks to @nbaudet for making it happen with the PR. Your ping is what got me notified about this issue.

I mistakenly missed some files when committing to WordPress SVN for version 3.0.0 (Wish wish wish they used git and tags for versioning)

This is now fixed in version 4.0.2. I also pushed version 3.0.2 with a fix for just that major version and the missing files.

If you would like to help maintain this plugin, please reach out here.