• Resolved gishua

    (@gishua)


    We are still using php 7.3 and this could be the cause, but here are the error messages when trying to upload a featured image within a post. Note: If I upload in the Media Library it works fine.

    [12-Jan-2023 15:25:27 America/New_York] PHP Fatal error: Uncaught Error: Cannot use object of type WP_Post as array in /var/www/example.com/webroot/wp-content/plugins/w3-total-cache/Util_AttachToActions.php:76
    Stack trace:

    0 /var/www/example.com/webroot/wp-includes/class-wp-hook.php(308): W3TC\Util_AttachToActions->on_pre_post_update(11653, Object(WP_Post))

    1 /var/www/example.com/webroot/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)

    2 /var/www/example.com/webroot/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    3 /var/www/example.com/webroot/wp-includes/post.php(4433): do_action(‘pre_post_update’, 11654, Array)

    4 /var/www/example.com/webroot/wp-includes/post.php(6346): wp_insert_post(Array, false, true)

    5 /var/www/example.com/webroot/wp-includes/post.php(4802): wp_insert_attachment(Array, false, 0, false)

    6 /var/www/example.com/webroot/wp-content/plugins/auto-image-attributes-from-filename-with-bulk-updater/admin/iaff_image-attributes-from-filename-do.php(720): wp_update_post(Array)

    7 /va in /var/www/example.com/webroot/wp-content/plugins/w3-total-cache/Util_AttachToActions.php on line 76

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Arun Basil Lal

    (@arunbasillal)

    Hello @gishua

    My name is Arun. Sorry for the late reply, I was under the weather for a bit. Happy new year.

    I tried to replicate the error by installing W3 Total Cache and by uploading an image as a featured image on a post. Couldn’t replicate it. My PHP version was 7.3.5.

    Can you please disable the Auto Image Attributes plugin and try again please? This will help me confirm that the error is coming from my plugin. Currently it looks like it is coming from W3 Total Cache, but I could be wrong.

    Looking forward to your feedback.

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Any update @gishua? Are you still able to replicate this?

    Thread Starter gishua

    (@gishua)

    Hi @arunbasillal, thank you for your response. I have updated all plugins & tried uploading to our custom post types & to regular posts and it worked now. Whatever you did to adjust the plugin seems like it worked.

    I will try it on the live site and let you know the results as well.

    Thank you

    Josh

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Thanks for the update Josh ??

    Thread Starter gishua

    (@gishua)

    @arunbasillal looks like it works on live as well! Thank you!

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Perfect ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal Error: Cannot use object of type WP_Post as array’ is closed to new replies.