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

Breaks WP-CLI even when run from automated cron #25

Closed
juancaser opened this issue Apr 25, 2019 · 4 comments
Closed

Breaks WP-CLI even when run from automated cron #25

juancaser opened this issue Apr 25, 2019 · 4 comments
Assignees
Labels

Comments

@juancaser
Copy link

What I Expected To Happen

No error, wp-cli cron should run without any error

What Happened Instead

Fatal error: Uncaught Error: Call to a member function getOptions() on null in /home/..../wp-content/plugins/404-solution/includes/DataAccess.php:808

Steps to Reproduce the Bug

Run wp cron event run --due-now

Debug Lines

Stack Trace
Fatal error: Uncaught Error: Call to a member function getOptions() on null in /home/.../wp-content/plugins/404-solution/includes/DataAccess.php:808 Stack trace: #0 /home/.../wp-includes/class-wp-hook.php(286): ABJ_404_Solution_DataAccess::deleteOldRedirectsCron() #1 /home/.../wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /home/.../wp-includes/plugin.php(531): WP_Hook->do_action(Array) #3 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(288): do_action_ref_array('abj404_cleanupC...', Array) #4 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(259): Cron_Event_Command::run_event(Object(stdClass)) #5 [internal function]: Cron_Event_Command->run(Array, Array) #6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(93): call_user_func(Array, Array, Array) #7 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher in /home/.../wp-content/plugins/404-solution/includes/DataAccess.php on line 808 ABJ404-SOLUTION Fatal error handler: {"type":1,"message":"Uncaught Error: Call to a member function getOptions() on null in /home/.../wp-content/plugins/404-solution/includes/DataAccess.php:808 Stack trace: #0 /home/.../wp-includes/class-wp-hook.php(286): ABJ_404_Solution_DataAccess::deleteOldRedirectsCron() #1 /home/.../wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /home/.../wp-includes/plugin.php(531): WP_Hook->do_action(Array) #3 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(288): do_action_ref_array('abj404_cleanupC...', Array) #4 phar:///usr/local/bin/wp/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(259): Cron_Event_Command::run_event(Object(stdClass)) #5 [internal function]: Cron_Event_Command->run(Array, Array) #6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(93): call_user_func(Array, Array, Array) #7 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher","file":"/home/.../wp-content/plugins/404-solution/includes/DataAccess.php","line":808}, Additional info: (none)

@aaron13100
Copy link
Owner

Hey @thejuanwhocode, thanks for the stacktrace. Do you have version 2.18.0? I can't seem to find a line that corresponds to the error message.

@aaron13100 aaron13100 added the bug label Apr 25, 2019
@aaron13100 aaron13100 self-assigned this Apr 25, 2019
@aaron13100
Copy link
Owner

If you don't have the latest version, please upgrade and try again.

If you do have the latest version, would you please click on the "Tools" tab and scroll to the bottom to click "Run Maintenance" and then send me the error message from the debug file. The debug file is at 404 Solution -> Options -> Advanced Settings Etc -> View the debug file.

thanks

@juancaser
Copy link
Author

If you don't have the latest version, please upgrade and try again.

If you do have the latest version, would you please click on the "Tools" tab and scroll to the bottom to click "Run Maintenance" and then send me the error message from the debug file. The debug file is at 404 Solution -> Options -> Advanced Settings Etc -> View the debug file.

thanks

thanks man, will check tommorow see if it now works!

@juancaser
Copy link
Author

juancaser commented May 6, 2019

It works i dont have any error anymore... i let it run for couple days via cronjob and run it manually so far its not breaking the wp-cli anymore, the update did its job, will push this update to our production now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants