• wpjgcy

    (@wpjgcy)


    I would be grateful for any help with the following fatal error from the spio-refresh-dir cron job (details below). I have tried both enabling and disabling the ‘Background’ processing option. Thanks in advance.

    spio-refresh-dir

    { “args”: { “amount”: 10 } }

    ShortPixel\Controller\AdminController->scanCustomFoldersHook()

    —Error message —

    [20-Sep-2024 08:45:03 UTC] PHP Fatal error: Uncaught Error: Unknown named parameter $args in /home/customer/www/[redacted].co.uk/public_html/wp-includes/class-wp-hook.php:324
    Stack trace: 0 /home/customer/www/[redacted].co.uk/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 1 /home/customer/www/[redacted].co.uk/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 2 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(364): do_action_ref_array(‘spio-refresh-di…’, Array) 3 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/cron-command/src/Cron_Event_Command.php(286): Cron_Event_Command::run_event(Object(stdClass)) 4 [internal function]: Cron_Event_Command->run(Array, Array) 5 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array) 6 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher{closure}(Array, Array) 7 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array) 8 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(431): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array) 9 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(454): WP_CLI\Runner->run_command(Array, Array) 10 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1269): WP_CLI\Runner->run_command_and_exit() 11 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start() 12 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState)) 13 phar:///usr/local/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap() 14 phar:///usr/local/bin/wp-cli.phar/php/boot-phar.php(20): include(‘phar:///usr/loc…’) 15 /usr/local/bin/wp-cli.phar(4): include(‘phar:///usr/loc…’) 16 {main}

    thrown in /home/customer/www/[redacted].co.uk/public_html/wp-includes/class-wp-hook.php on line 324

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pedro

    (@petredobrescu)

    Hello @wpjgcy,

    We had a look over this error and the main question is: are you by any chance using PHP 8.0? Because this is the only version where this error shows up and it seems to come directly from the WordPress core. Are you able to upgrade to PHP 8.1, or even better 8.2 or 8.3? Normally, that should fix this error.

    If it still doesn’t work after upgrading PHP, please let us know and we’ll get deeper into details. For example, it would be good to know what you’re trying to achieve, to see if there are better alternatives.

    Thanks

    Thread Starter wpjgcy

    (@wpjgcy)

    Hi, thanks for the quick response. Unfortunately the site is running PHP 8.2.23, so upgrading will not help.

    Re what we are trying to achieve I cannot answer as the cron job appears to have been created by shortpixel itself. Only comment I can make is that we do have image folders with images that are NOT part of the wordpress media library but cannot see how this would be related to the issue above.

    Thanks again for your help.

    Plugin Author Pedro

    (@petredobrescu)

    This is really strange! I confirm the cron job is added by our plugin and its purpose is to check if new items have been added to the Custom Media folders. Therefore, if you have added the folders you are mentioning to our plugin’s Custom Media area, this cron job will run every 30 minutes.

    Can you please send us your site debug information (either here, or directly by contacting us if you have privacy concerns), so we can check if another plugin or your active theme could generate that error?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.