Skip to content
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

Fatal error on ActionFactory class #999

Open
kermage opened this issue Oct 6, 2023 · 5 comments
Open

Fatal error on ActionFactory class #999

kermage opened this issue Oct 6, 2023 · 5 comments
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@kermage
Copy link

kermage commented Oct 6, 2023

wp-mail-smtp

seo-by-rank-math

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

@Konamiman Konamiman added type: bug The issue is a confirmed bug. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Oct 9, 2023
@Konamiman
Copy link
Contributor

Konamiman commented Oct 9, 2023

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/).

@pbwebdev
Copy link

Are there any work arounds for this issue?

@jorgeatorres
Copy link
Member

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.

@barryhughes
Copy link
Member

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?

@barryhughes
Copy link
Member

...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-plugins directory.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

5 participants