Bug: Admin search returns 0 results – passes only first post ID to main query

Support Meta Box AIO Bug: Admin search returns 0 results – passes only first post ID to main query

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50152
    FRYEFRYE
    Participant

    We are experiencing a bug with the admin post list search on a site running Meta Box AIO 3.10.0 (WordPress, WPML active).

    Symptom:
    Searching in any admin post list (native search box on edit.php) always returns 0 results – for all post types, including posts and pages. This happens even when the search term is literally part of existing post titles.

    What we found via Query Monitor:

    The MBAC search integration correctly finds the matching posts. For a search for "walze" (edit.php?s=walze&post_type=inventory&lang=de):

    1. MBAC\Post->search_post_ids_by_title() runs:
    SELECT ID FROM wp_posts WHERE post_title LIKE N'%walze%'
    → returns **72 rows** (correct)

    2. MBAC\Post->search_post_ids_by_metas() runs against wp_postmeta → 0 rows (fine)

    3. However, the main query (WP_Query->get_posts) then contains:
    AND wp_posts.ID = 9
    → **a single post ID instead of the 72 found IDs**, resulting in 0 rows displayed.

    It looks like the list of found post IDs is passed to the main query as a single ID (possibly the ID list ends up in the p parameter instead of post__in, so everything after the first ID gets dropped).

    Environment:
    - Meta Box AIO 3.10.0
    - WordPress (current), WPML Multilingual CMS 4.9.6
    - Custom post types registered, custom relational DB usage via MetaBox
    - Search is broken globally in wp-admin (all post types), frontend is not affected

    Could you confirm whether this is a known issue, and if a fix is planned? A hint on how to disable the MBAC search integration as a workaround (so the native WP search takes over again) would also help us short-term, as the site launches soon.

    #50154
    PeterPeter
    Moderator

    Hello FRYE,

    Thanks for reaching out.

    I'm not able to reproduce the issue on my demo site using the MB Admin Columns and WPML plugin to search for a post of a CPT. Can you please share your site admin account by submitting this contact form https://metabox.io/contact/

    I will take a look.

    #50157
    FRYEFRYE
    Participant

    Hello,

    We are talking about a live site containing sensitive data, so granting access isn't that simple—is there no other option?

    Thanks
    Joerg

    #50160
    PeterPeter
    Moderator

    Hello Joerg,

    Can you please copy your site to a staging site and remove sensitive data if needed and share the credentials? Or share a screen record of steps you take on your site to reproduce the issue. I will follow those steps to reproduce the issue on my site.

    Thank you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.