• Resolved paulfedorov

    (@paulfedorov)


    Hey!
    Sorry if it’s being discussed before (not easily found though) but after upgrading to the latest version (9.1.1) I can’t create new recipe anymore. Error 500 notification is shown when trying to save a new recipe in WPRM, while editing existing ones is working fine.

    Disabling all other plugins, changing themes, even bringing whole site to a local env doesn’t help. WP is 6.4.2

    Debug.log has this

    [13-Jan-2024 10:38:45 UTC] PHP Fatal error:  Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in ...\wp-content\plugins\wp-recipe-maker\includes\public\class-wprm-list-saver.php:189
    Stack trace:
    #0 ...\wp-content\plugins\wp-recipe-maker\includes\public\class-wprm-list-saver.php(189): in_array(NULL, false)
    #1 ...\wp-includes\class-wp-hook.php(326): WPRM_List_Saver::update_post(0, NULL)
    #2 ...\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #3 ...\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
    #4 ...\wp-includes\post.php(4760): do_action('save_post', 0, NULL, false)
    #5 ...\wp-includes\rest-api\endpoints\class-wp-rest-posts-controller.php(676): wp_insert_post(Array, true, false)
    #6 ...\wp-includes\rest-api\class-wp-rest-server.php(1193): WP_REST_Posts_Controller->create_item(Object(WP_REST_Request))
    #7 ...\wp-includes\rest-api\class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/wprm_rec...', Array, NULL)
    #8 ...\wp-includes\rest-api\class-wp-rest-server.php(431): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #9 ...\wp-includes\rest-api.php(424): WP_REST_Server->serve_request('/wp/v2/wprm_rec...')
    #10 ...\wp-includes\class-wp-hook.php(324): rest_api_loaded(Object(WP))
    #11 ...\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #12 ...\wp-includes\plugin.php(565): WP_Hook->do_action(Array)
    #13 ...\wp-includes\class-wp.php(418): do_action_ref_array('parse_request', Array)
    #14 ...\wp-includes\class-wp.php(813): WP->parse_request('')
    #15 ...\wp-includes\functions.php(1336): WP->main('')
    #16 ...\wp-blog-header.php(16): wp()
    #17 ...\index.php(17): require('C:\\Users\\User\\L...')
    #18 {main}
      thrown in ...\wp-content\plugins\wp-recipe-maker\includes\public\class-wprm-list-saver.php on line 189
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brecht

    (@brechtvds)

    That’s strange. I have not heard from others with this problem or been able to replicate that problem. It seems to be working fine on this clean install, for example: https://app.instawp.io/wordpress-auto-login?site=$2y$10$EEdzOEvdkItwnqfIz.fIFe59kvQL6ZOWxjTPDLZzTMPBmnp8btP.2

    You have that error both when saving through the WP Recipe Maker > Manage page and when saving a recipe directly in a post?

    Thread Starter paulfedorov

    (@paulfedorov)

    Thanks for speedy reply! Turned out there is no problem with your plugin, there was a rare case of auto-increments dissapearing from all tables in DB, thus preventing normal work for pretty much everything (but can’t be seen unless new content is created). Managed to fix with some help from this old post, recipes can be created now.

    Plugin Author Brecht

    (@brechtvds)

    Happy to hear and thanks for updating the topic. Do let me know if you experience any further issues at all!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Can’t create new recipe in plugin (latest plugin & WP version)’ is closed to new replies.