• Resolved badwolfmc

    (@badwolfmc)


    Reposting this in a new thread per your instructions here. I’ve been getting a Critical Error on most New Draft/Clone/Rewrite and Republish attempts, and only recently (I believe since the update to version 4.5). Seems to happen more frequently on standard post clones rather than pages. At least for me, the logs seem to point to a conflict with WP Admin Audit?

    Clearing the cache doesn’t seem to affect anything. Upon receiving the critical error I usually hit back and the duplicated post is present, but the new post is not editable in Elementor and hitting the trash link throws another error. I am able to edit the “ghost” draft with WP’s editor, and only after opening it with that editor am I able to trash the post.

    Error here:

    2023-10-06T09:05:34+00:00 CRITICAL Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /bitnami/wordpress/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php:23
    Stack trace:
    #0 /bitnami/wordpress/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php(23): array_keys()
    #1 /bitnami/wordpress/wp-content/plugins/wp-admin-audit/classes/Sensors/Post.php(251): WADA_PostUtils::getChangedMeta()
    #2 /bitnami/wordpress/wp-content/plugins/wp-admin-audit/classes/Sensors/Post.php(196): WADA_Sensor_Post->getPostMetaEventDetails()
    #3 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(310): WADA_Sensor_Post->onAfterPostInsert()
    #4 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 /opt/bitnami/wordpress/wp-includes/post.php(5472): do_action()
    #7 /opt/bitnami/wordpress/wp-includes/post.php(4765): wp_after_insert_post()
    #8 /bitnami/wordpress/wp-content/plugins/duplicate-post/admin-functions.php(711): wp_insert_post()
    #9 /bitnami/wordpress/wp-content/plugins/duplicate-post/src/handlers/link-handler.php(143): duplicate_post_create_duplicate()
    #10 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(310): Yoast\WP\Duplicate_Post\Handlers\Link_Handler->clone_link_action_handler()
    #11 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #12 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    #13 /opt/bitnami/wordpress/wp-admin/admin.php(419): do_action()
    #14 {main}
      thrown in /bitnami/wordpress/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php on line 23
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @badwolfmc,

    Thank you for reaching out.

    I’ve installed Yoast Duplicate Post and WP admin audit on a local site, and with those 2 plugins active, I couldn’t reproduce a fatal error. LocalWP was per default on PHP 8.1. When I put it on 8.2 – I did get the same fatal, but it originates in code in WP admin audit. On:

    Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /Users/user/Local Sites/ps/app/public/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php:23

    Having said this, if you are also on PHP 8.2 – please reach out to the WP admin audit plugin author(s) for reporting this.

    Thread Starter badwolfmc

    (@badwolfmc)

    I’m on 8.0, but thank you, I will reach out to them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Critical Error on Post Clone’ is closed to new replies.