av3nger / cf-images

Offload, Store, Resize & Optimize with Cloudflare Images - plugin for WordPress
https://wordpress.org/plugins/cf-images/
GNU General Public License v3.0
20 stars 2 forks source link

Bulk offload not working properly #47

Closed zjcboy closed 1 month ago

zjcboy commented 1 month ago

Clicking on it brings up Processing first image... But nothing happens.

After refreshing the page, it shows that the number of offloads has increased by one and does not continue to increase.

zjcboy commented 1 month ago

[STDERR] PHP Fatal error: Uncaught TypeError: CF_Images\App\Media::maybe_save_hash(): Argument #1 ($variants) must be of type array, null given, called in /home/test.com/public_html/wp-content/plugins/cf-images/app/class-media.php on line 447 and defined in /home/test.com/public_html/wp-content/plugins/cf-images/app/traits/trait-stats.php:53 Stack trace:

0 /home/test.com/public_html/wp-content/plugins/cf-images/app/class-media.php(447): CF_Images\App\Media->maybe_save_hash()

1 /home/test.com/public_html/wp-content/plugins/cf-images/app/class-media.php(335): CF_Images\App\Media->upload_image()

2 /home/test.com/public_html/wp-includes/class-wp-hook.php(324): CF_Images\App\Media->ajax_bulk_process()

3 /home/test.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()

4 /home/test.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()

5 /home/test.com/public_html/wp-admin/admin-ajax.php(192): do_action()

av3nger commented 1 month ago

@zjcboy , it looks like your API credentials might be incorrect. Can you please follow this guide to setup a correct API token: https://vcore.au/tutorials/how-to-setup-cloudflare-images-plugin/#cloudflare-account-id-and-api-token

zjcboy commented 1 month ago

Thank you