• Resolved bsmolyanov

    (@bsmolyanov)


    I get the following error since updating to v. 1.11.2:

    Got error 'PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) \n\t\t\tWHERE 1=1  AND ((wp_posts.post_type = 'post' AND (wp_posts.post_status...' at line 2 for query \n\t\t\tSELECT   wp_posts.* , mbr.from\n\t\t\tFROM wp_posts  INNER JOIN wp_mb_relationships AS mbr ON  (mbr.to = wp_posts.ID AND mbr.type = 'posts_to_pages' AND mbr.from IN ()) \n\t\t\tWHERE 1=1  AND ((wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending')))\n\t\t\tGROUP BY mbr.from, wp_posts.ID\n\t\t\tORDER BY mbr.order_from\n\t\t\t\n\t\t made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook-...PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) \n\t\t\tWHERE 1=1  AND ((wp_posts.post_type = 'post' AND (wp_posts.post_status...' at line 2 for query \n\t\t\tSELECT   wp_posts.* , mbr.from\n\t\t\tFROM wp_posts  INNER JOIN wp_mb_relationships AS mbr ON  (mbr.to = wp_posts.ID AND mbr.type = 'posts_to_pages' AND mbr.from IN ()) \n\t\t\tWHERE 1=1  AND ((wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending')))\n\t\t\tGROUP BY mbr.from, wp_posts.ID\n\t\t\tORDER BY mbr.order_from\n\t\t\t\n\t\t made by do_action('wp_ajax_nopriv_as_async_request_queue_runner'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Async_Request->maybe_handle, ActionScheduler_AsyncRequest_QueueRunner->handle, do_action('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook-...'

    My code for enabling relationships is:

    add_action("mb_relationships_init", function () {
        MB_Relationships_API::register([
            "id" => "posts_to_pages",
            "from" => "post",
            "to" => "post",
        ]);
    });
Viewing 1 replies (of 1 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @bsmolyanov ,

    I check the SQL in the error message and see many details there, can you please check these:

    • How do you get connected posts? Can you share your code?
    • Is there anything related to Action Scheduler, which might be used by plugins like WooCommerce, Elementor, etc? It’s there in the error message.

    Can you also try deactivate other plugins, keep only Meta Box & MB Relationships to see if the error is still there?

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Error since update v. 1.11.2’ is closed to new replies.