-
Notifications
You must be signed in to change notification settings - Fork 220
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
PHP Fatal error: Uncaught InvalidArgumentException: The group "rocket-rucss" does not exist. #6119
Comments
Related issue on Action Scheduler repo: |
Thanks for creating the issue @khalilgharbaoui have you contacted our support team about this issue? It would be good to have access to the affected website in order to investigate it further. |
@khalilgharbaoui Is this happening to you even after reactivating RUCSS? If so, could you share with us credentials to your website + SFTP, so we could investigate this? You could reach our support or send them directly to piotr[at]wp-media.me. |
Reproduce the issueI succeeded to reproduce the issue after looking at the logic.
To prevent any element to be added to the Queue can bail out at the beginning of the method [ To load the Action Scheduler plugin we need to comment the line Then activate RUCSS and you should see the exception when the Queue is running. Identify the root causeThe root cause of this issue is that the group is created when an element is added and not when the queue is runned. Scope a solutionA way to solve that issue is to check for the group being created before executing the queue. What do you think @engahmeds3ed ? |
Reproduce the issueThis issue happens when:
You need to do this change to the plugin while it's not active.
Also you need to remove the rocket-rucss group from
Identify the root causeAs per our investigation on that, this is what we think: we are not setting the store object so it's null exactly like the default queue runner here So Based on that code, both runners will share the store instance (because it's singleton design pattern and both CRONs are on the same request) What happens here is that the custom runner is running before the default runner passing the group to the store stake_claim method here and based on that code that was added in this woocommerce/action-scheduler#905 you are setting the group item inside claim_filters and as we use the same object for store in both queue runners, the group will be kept the one that added in the custom queue runner. Scope a solutionWe don't need to create the group (after a discussion with AS team, they don't like creating the group till a job comes up), we just need to fix the root cause not to let out queue runner interfere with the default or any other runners.
I tested the fix locally with @CrochetFeve0251 help and it worked. Estimated effort[XS] The hard part of this issue is to reproduce the issue in a consistent way. |
See: wp-media#6119 for details TL;DR Fixes error: ``` PHP Fatal error: Uncaught InvalidArgumentException: The group "rocket-rucss" does not exist. in /srv/users/stgleather/apps/stgleather/public/wp-content/plugins/woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:907 ```
Hi @piotrbak, Unfortunately, I can not provide you with the credentials, the system I am working on is private. Hope that helps, and would be nice if that gets merged in, so I don't have to edit my files on the next update. Salaam 👋🏽 |
@engahmeds3ed
|
@AghaFarokh This means that you have an older version of Action scheduler, can u plz try installing action scheduler's standalone plugin (version >= 3.6.0). We need also to guard against that in our code to have something like:
|
Actually I didn't have a separate standalone AS plugin and my WordPress is updated to the latest version |
There is a conflict with woocommerce and wp-rocket, if you have the “remove unused CSS feature” in wp-rocket checked.
You will get the error you have noted.
Workaround:
Uncheck the “remove unused CSS” in wp-rocket and the problem goes away.
also see: https://wordpress.org/support/topic/the-group-rocket-rucss-does-not-exist/#post-17004056
The text was updated successfully, but these errors were encountered: