-
Notifications
You must be signed in to change notification settings - Fork 211
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
[WIP] Possible conflict with Woocommerce 4.4.0 #3003
Comments
WooCommerce 4.4 started to use the same container package as us: https://github.com/woocommerce/woocommerce/blob/b3097dbae6533efd569be95c20076a68bc146714/composer.json#L14 But they are using version 3, which is only compatible with PHP 7, while we still use version 2 (for now). Composer being what it is, only one version of the package is loaded, during the runtime, and Since version 2 & 3 of the container are not compatible, it's preventing our code from running as expected. |
Same problem with 7 clients. Any workaround except stopping the plugin? |
Yep got it also on all my sites, just disable until the new release |
There is a PR about it. Hopefully, it can be merged soon. |
Same. 20+ client sites affected. Not cool. |
PR is now in QA. Making sure we don't break anything else or have any regressions. Once we can confirm it's all good, we'll be releasing. |
Hello @MrGKanev @101sam @joshlcomstock, WooCommerce released 4.4 earlier today which included changing the container (League Container) to a PHP 7 only version. Rocket also uses the League Container; however, we use a PHP 5.6 compatible version. The fatal error occurs when either plugin loads the container first. How? Each expects a particular version, but only one version gets loaded into memory by Composer. The 3.6.4 fix that's in QA right now will be released today...very shortly. What did we change?
How does this fix the problem?
To PHP, these files of classes, traits, etc. are now different. No more fatal errors from this problem. |
Well, i cant downgrade wordpress/woocommerce anymore. Wp rocket now disabled during this fatal error but can i still update and re-activate it? Because it's not activated right now and if i remember well wp rocket can only be updated when it's enabled.. |
support@wp-rocket.me is also not receiving any mails, Mail Delivery System - user over quota... |
I have just gone through and deactivated the WooCommerce 4.4.0 plugin and WP-Rocket is able to be reactivated without issue. Hopefully, WC releases their fix soon. |
Sorry about that @ChrisSmoke1. We cleared out the email server and emails are flowing again. Can you resend to us please? I apologize in advance for the inconvenience. |
…3004) * add Container classes * replace League\Container with WP_Rocket\Engine\Container * Add permissions_callback to RESTSubscriber routes * Fix syntax error * update container namespace in our files * update composer.json not to require League Container * update plugin version * add container dependency * Adjust tests not to support jquery-migrate after WP version 5.5 PR #2991 * ignore Container directory Co-authored-by: Ahmed Saeed <eng.ahmeds3ed@gmail.com> Co-authored-by: Caspar Green <cg@caspar.green>
@ChrisSmoke1 Yes, Rocket needs to be activated in order to update it through the admin area. However, reactivating it now will cause a fatal error since WooCommerce is at version 4.4. on your site. What can you do? Please reach out to our Support team for guidance on how to load the Rocket 3.6.4. Here's a reference for you too. |
I did this, I download the plugin and I uploaded to my webserver. That worked for me. |
@sknight80 That's wonderful! |
@MrGKanev @101sam @joshlcomstock We have released 3.6.4 with the fix for fatal error due to conflicts with WooCommerce 4.4 release. Here is a document that guides you in how to update Rocket. Thank you for your patience. |
Yep, I saw it the moment it went up. Thanks! :) |
Like described in woocommerce/woocommerce#27384 namespaced / scoped dependencies should prevent such cases in the future: Not sure if namespaced dependencies are used but this would prevent such issues in the longterm: https://github.com/humbug/php-scoper So the composer autoloader will not use the wrong class / dependency with a different interface. |
Thanks @DanielRuf for sharing and looping the WC issue back here. Appreciate it. And yes, you're right. There are ways to encapsulate specific external dependencies. After this problem, we are talking that step. |
I want to thank WP-Rocket to sent also the "Important Information for WooCommerce Users" e-mail to all customers. Backup was done and just wanted to hit the upgrade option for wordpress Pfff ;-) |
FTP upload and re-activate WP Rocket 3.6.4 worked :-) |
@PeterTemps That error is typically due to something with going wrong during the update process or missing or old composer files. I'd suggest using FTP/SSH to bring all of the Rocket 3.6.4 files over to your server. Check out the FTP section of this doc. |
@Mic2005 First of all, your welcome. What do we recommend? Update to WP Rocket 3.6.4 before updating WooCommerce. |
I'll try. Thanks! |
i had the same issue. i installed now the newest wp rocket, it did activated but the site is working 10 times slower than without it...any suggestions? |
We have a similar problem, but we are working with the NGINX server. What we saw that the new version remove all our settings (in WordPress), and we need to reconfigure all the parameters (we are still trying to figure out where, if its real problem or just configuration) |
@aniatanasova Hmm, I'm not sure why or what. But we'd like to dig into it further with you. Could you please open a Support ticket? We'll write you back to give you a safe way to share credentials with us. |
After a few rounds, we found out that the only way to go back to the same speed is to set up the parameters manually and not import/export - why I'm not sure, but its work on two different sites using NGINX. Thank you all for the quick fix |
@101sam Hmm that's interesting. The update "shouldn't" have removed settings. However, you experienced something that did just that. Hmm, I'm not sure why. But I do want to know. If you'd like, feel free to open a Support ticket. We can dig into with you. |
i did open a new issue and i also emailed at support. |
It's happening on two different servers, so I'm sure we can replicate it. But I need time for the client to come down. The problem we had as soon as the crash happens, we couldn't return to WordPress. WP command line not works, we had to delete the wp-rocket folder. Maybe this was not the optimal way, but that's the only way we manage to recover the site from the crash. We didn't want to login to the MySQL as WooCommerce has a database update during the update. It was risky to play with the wp_options at that stage. |
@101sam what tool or tools did you use for speed measure? |
We notice the speed changes from monitor we have on the site using: We verify it with: https://developers.google.com/speed/pagespeed/insights/ To debug and verify its coming from we-rocket
|
@101sam Have you found it to be the settings in WP Rocket? Or something else? |
Can't tell, it looks like a combination of situations: Or one of our crontab tried to kick in the middle of updates or while we upgrade. Or it was Wordfence blocking changes of code. |
you have to upgrade to 4.4.1, there is a fix for it : https://woocommerce.wordpress.com/2020/08/19/woocommerce-4-4-1-fix-release/ |
We're receiving tickets from customers having a fatal error after updating Woocommerce to 4.4.0.
Still investigating this. According to Remy, it looks like they are using the same container package as us, but not the same version, they are on the new one that requires PHP 7 and that includes breaking changes.
Errors are similar to this:
Fatal error: Declaration of League\Container\ImmutableContainerAwareTrait::getContainer() must be compatible with League\Container\Argument\ArgumentResolverTrait::getContainer(): Psr\Container\ContainerInterface in /home/446954.cloudwaysapps.com/krxgzndejz/public_html/wp-content/plugins/wp-rocket/vendor/league/container/src/Inflector/Inflector.php on line 32
The text was updated successfully, but these errors were encountered: