• Resolved hahahahahahaha

    (@hahahahahahaha)


    Hi,

    first of all, thank you for creating this plugin!

    I installed it already and Status is also Connected.
    But when i upload an image in media library its not getting saved on Cloudflare Images. Also we i try to upload them via Bulk Upload Button it shows initializing but nothing happens. I also tested it without custom domain but also no success.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Anton Vanyukov

    (@vanyukov)

    Hi @hahahahahahaha,

    Could you please tell me what hosting you are on?
    Also, yeah, if there are any errors in debug.log or in browser console, please share those here.

    Best regards,
    Anton

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    Im on raidboxes.de and get following error in log file (replaced Ip and url):

    2022/11/03 14:58:37 [error] 2936#2936: *11644 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to CF_Images\App\Core::maybe_save_hash() must be of the type array, null given, called in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 521 and defined in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php:602
    thrown in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 602" while reading response header from upstream, client: 111.111.111.11, server: xxx.de, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/wordpress.php-fpm.sock:", host: "xxx.de", referrer: "https://xxx.de/wp-admin/upload.php?page=cf-images"
    Plugin Author Anton Vanyukov

    (@vanyukov)

    @hahahahahahaha,

    Can you please try going into your Cloudflare account. Go to Images – Variants. And check if the “Flexible variants” is enabled.

    Best regards,
    Anton

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    it is disabled.
    Should i enable it?

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @hahahahahahaha,

    Yes. It should get auto enabled with the plugin, so something might be off, or it did not init properly for some reason. Please try to enable and see if that fixes everything.

    Best regards,
    Anton

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    still no success.
    I use wordpress multisite, maybe this is the problem?

    It also shows me Offloaded: 15 images. I think i tried to upload 15 times now.

    #6 {main}
    #5 /home/wp/disk/wordpress/wp-admin/admin-ajax.php(187): do_action()
    #4 /home/wp/disk/wordpress/wp-includes/plugin.php(476): WP_Hook->do_action()
    #3 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #2 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(307): CF_Images\App\Core->ajax_bulk_process()
    #1 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php(337): CF_Images\App\Core->upload_image()
    #0 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php(521): CF_Images\App\Core->maybe_save_hash()
    Stack trace:

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @hahahahahahaha,

    Ok, let me do some testing on a multisite install and see if I can figure it out. Are there any files in Cloudflare Images?

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    no the folder is empty.

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @hahahahahahaha,

    I can’t replicate this on my multisite subdomain install as well.

    Can you please check a few things on the Cloudflare side:

    1. Go to Manage Account – Billing, select Subscription. You should have an active Cloudflare Images subscription.

    2. Go to your user profile. Select API Tokens. And make sure that there the token you are using is active, has the “Account.Cloudflare Images” permission and has access to the proper account in the “Resources” field.

    Best regards,
    Anton

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    Checked everything and its correct.

    1. Status says connected
    2. When i click the Upload Button it shows me “Initializing…” until i refresh page
    3. When i click the Remove Button it shows me “Processing image 4 out of 9…” but there are no images on Cloudflare but 9 Images have been served already (not from Plugin).

    Plugin Author Anton Vanyukov

    (@vanyukov)

    Ok, so the Cloudflare side is not the problem. Let’s see if the plugin side is a problem. Can you please add:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );

    to your wp-config.php file.

    Then in the plugin in wp-content/plugins/cf-images/App/Core.php on line 519 right after:

    $results = $image->upload( $path, $attachment_id, $name );

    add

    error_log( print_r( $results, true ) );

    So it should look something like this:

    $results = $image->upload( $path, $attachment_id, $name );
    error_log( print_r( $results, true ) );

    Try to offload an image. Then open up wp-content/debug.log and paste the last entries here. Or if there’s too much data there, you can use https://pastebin.com or any other service to paste a lot of data.

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    Hi @vanyukov

    here is the log:

    #0 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php(524): CF_Images\App\Core->maybe_save_hash()
    Stack trace:
    [04-Nov-2022 07:04:26 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to CF_Images\App\Core::maybe_save_hash() must be of the type array, null given, called in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 524 and defined in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php:605
    [04-Nov-2022 07:04:26 UTC] PHP Notice: Undefined property: stdClass::$variants in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 524
    [04-Nov-2022 07:04:26 UTC] PHP Notice: Undefined property: stdClass::$id in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 523
    )
    (
    [04-Nov-2022 07:04:26 UTC] stdClass Object
    Plugin Author Anton Vanyukov

    (@vanyukov)

    Hi @hahahahahahaha,

    I need the part that’s after, please
    [04-Nov-2022 07:04:26 UTC] stdClass Object

    Best regards,
    Anton

    Thread Starter hahahahahahaha

    (@hahahahahahaha)

    @vanyukov

    04-Nov-2022 07:24:10 UTC] stdClass Object
    #7 /home/wp/disk/word in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 605
    #6 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(307): CF_Images\App\Async\Task->handle_postback()
    #5 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Async/Task.php(198): CF_Images\App\Async\Upload->run_action()
    #4 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Async/Upload.php(83): do_action()
    #3 /home/wp/disk/wordpress/wp-includes/plugin.php(476): WP_Hook->do_action()
    #2 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #1 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(307): CF_Images\App\Core->upload_image()
    #0 /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php(524): CF_Images\App\Core->maybe_save_hash()
    Stack trace:
    [04-Nov-2022 07:08:17 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to CF_Images\App\Core::maybe_save_hash() must be of the type array, null given, called in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 524 and defined in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php:605
    [04-Nov-2022 07:08:17 UTC] PHP Notice: Undefined property: stdClass::$variants in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 524
    [04-Nov-2022 07:08:17 UTC] PHP Notice: Undefined property: stdClass::$id in /home/wp/disk/wordpress/wp-content/plugins/cf-images/App/Core.php on line 523
    )
    Plugin Author Anton Vanyukov

    (@vanyukov)

    @hahahahahahaha,

    That’s really strange. I set up a test account on raidboxes.de, and while I did have to add the defines via the control panel, rather than the plugin, after that it worked fine.

    From the log above, it seems that the response is either empty or not showing up at all, which should not happen. Can you please email me at [email protected], I’ll need some additional details to debug this further.

    Best regards,
    Anton

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Images not uploading’ is closed to new replies.