Git Product home page Git Product logo

Comments (5)

WPprodigy avatar WPprodigy commented on June 14, 2024 1

Not exactly the same, but I got the following after activating the master-branch version of this plugin on a site that hadn't been migrated yet:

PHP Fatal error:  Uncaught Error: Call to undefined function Action_Scheduler\Custom_Tables\Migration\as_next_scheduled_action() in /wp-content/plugins/action-scheduler-custom-tables/src/Migration/Migration_Scheduler.php:59
Stack trace:
#0 /wp-content/plugins/action-scheduler-custom-tables/src/Plugin.php(83): Action_Scheduler\Custom_Tables\Migration\Migration_Scheduler->is_migration_scheduled()
#1 /wp-includes/class-wp-hook.php(284): Action_Scheduler\Custom_Tables\Plugin->schedule_migration()
#2 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#3 /wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /wp-includes/load.php(684): do_action('shutdown')
#5 [internal function]: shutdown_action_hook()
#6 {main}
  thrown in /wp-content/plugins/action-scheduler-custom-tables/src/Migration/Migration_Scheduler.php on line 59

from action-scheduler-custom-tables.

JPry avatar JPry commented on June 14, 2024

@thenbrent I've spent some time looking into this one to see about fixing it. Do you have any steps to reproduce? I've tried kicking off the migration manually via WP CLI, but that didn't trigger any errors.

It also appears that this shouldn't even be a problem in the first place, since it's trying to find a namespaced version of the function rather than the one in the global namespace.

If you have any more information, I'll be glad to keep looking.

from action-scheduler-custom-tables.

thenbrent avatar thenbrent commented on June 14, 2024

@JPry no unfortunately, the only steps to really reproduce are something vague like "install ASCT, check error log". I noticed this showing up in the error log on one (or maybe two) of the sites I installed ASCT on pre-release. I haven't seen it locally, or on all sites. It also appeared only once, or very infrequently on those sites AFAICS (so it may related to first load or something).

It's not impacting functionality as far as I can tell. Migrations, regular usage all seem fine, so we can close this for now if you can't reproduce/see how it could happen.

from action-scheduler-custom-tables.

thenbrent avatar thenbrent commented on June 14, 2024

I had a closer look at this. I initially suspected the issue related to namespacing, because of the method included in the error: Action_Scheduler\Custom_Tables\Migration\as_next_scheduled_action(), and couldn't see how that would be the case.

However, I now suspect it's likely being logged when 'shutdown' is called before Action Scheduler has been loaded (and therefore, as_next_scheduled_action() is not available in Action_Scheduler\Custom_Tables\Migration\Migration_Scheduler->is_migration_scheduled()).

While that would be rare, it's certainly possible if code is terminating requests earlier than 'plugins_loaded' with priority 1, which is when AS is loaded.

Fix incoming...

from action-scheduler-custom-tables.

WPprodigy avatar WPprodigy commented on June 14, 2024

Oh, nice find. That's definitely seems to be it, seeing that we had a separate fatal error on the site.

from action-scheduler-custom-tables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.