Post field with select advanced - search doesn't work well

Support General Post field with select advanced - search doesn't work wellResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27449
    AharonAharon
    Participant

    Hi,

    I'm using the latest version of MetaBox (5.3.9).
    I've configured a "Post" field using the select advanced option.
    I've set up "clone", "clone_sort" and "ajax" to true, with a query args for a custom post type and a custom taxonomy, as you can see:

    array(
        'id'         => $prefix . 'protocols',
        'name'       => esc_html__( 'Protocols', 'alomone' ),
        'type'       => 'post',
        'field_type' => 'select_advanced',
        'post_type'  => 'support', // custom post type
        'clone'      => true,
        'sort_clone' => true,
        'ajax'       => true,
        'query_args' => array(
            'tax_query' => array(
                array(
                    'taxonomy' => 'support_cat', // custom taxonomy
                    'field'    => 'slug',
                    'terms'    => 'protocols',
                ),
            ),
        ),
    ),

    The problem is that the search function of the select2 library is not working.
    When typing in the search bar, it always says "no results found".
    It is working when the 'post_type' arg is set to 'post', but still, it's a bit buggy: it first shows "no results found", and after 5 seconds the result is shown.

    See the dropdown loaded on init with ajax:
    https://prnt.sc/11smy8z

    And then trying to search but no results found:
    https://prnt.sc/11sn0uk

    Thanks,
    Aharon

    #27484
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for your feedback.

    I'm going to escalate the issue to the development team to check it and inform you later.

    #27890
    Long NguyenLong Nguyen
    Moderator

    Hi Aharon,

    I've re-tested the issue on my live site but do not see that. Can you please share the code that creates the CPT and taxonomy? I will check it on my end.

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