action-scheduler
action-scheduler copied to clipboard
Fatal error on ActionFactory class
| Plugin | Version |
|---|---|
| cardanopress-governance | 3.5.3 |
| wp-mail-smtp | 3.6.1 |
| seo-by-rank-math | 3.6.3 |
There seems to be an issue with loading the right class which should be from the latest version.
From what I can tell, the functions.php file loaded was of the 3.6+ version but the action factory used was from the older 3.5 version which does not have the create method
For whoever at Automattic picks this:
- Useful info: p7bje6-3wM-p2
- Please make the above information public, maybe by converting it to a post in the WooCommerce developer blog (and then add a link here: https://actionscheduler.org/faq/).
Are there any work arounds for this issue?
Hi @pbwebdev!
We're still looking into ways to address this, as it's a bit of an edge case. Our suggestion for now would be to make sure that you're running up to date plugins, so that their dependencies (Action Scheduler in particular) are also up to date. If any of your plugins is using an old version of Action Scheduler, nudging the developers so that they update their copy of AS will certainly help.
From what I can tell, the functions.php file loaded was of the 3.6+ version but the action factory used was from the older 3.5 version which does not have the create method
The root of this seems to be the use of Jetpack Autoloader with a static classmap from within Cardanopress Governance, which contains all of the Action Scheduler classes.
In situations like this one, that will 'subvert' Action Scheduler's own version resolution procedure and potentially cause an intermixing of classes from different versions—which, of course, if the problem we're facing here.
@kermage are you one of the developers of that plugin? Can you exclude Action Scheduler from the static classmap?
...In the meantime, some other ideas that may solve this:
- Install and activate the latest version of Action Scheduler (ie, as a standalone plugin).
- Or, if that doesn't work, move it to the
mu-pluginsdirectory.
The principle being if we can get the latest version of Action Scheduler (and, importantly, its class loader) to be first, we might solve the problem that way.
Closing, as it's essentially beyond our control if other products load Action Scheduler in a way that isn't recommended.