• Hello – Relevanssi stops my select2 search for a metabox ‘post’ field, configured as a custom user field. All the items list, it just does not search.

    After some debugging, I realise it is one of these issues:

    1. I have custom fields turned on. But I am unable to switch it to ‘none’. As upon page reload it returns to ‘some’.

    2. I also have ‘_bricks_page_content_2 ‘ saved in the list of custom fields to include in the index box. And have the same issue as trying to switch custom fields from ‘some’ to ‘none’ – the ‘_bricks_page_content_2 ‘ cannot be deleted and returns.

    3. Either the ‘Index the post author display name’ or ‘Index the post excerpt’ being toggled on.

    Can you let me know if you can replicate this issue and which option was the cause?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    You can’t set custom field indexing to “none” because all content in Bricks is stored in the _bricks_page_content_2 custom field. If you disable that, Relevanssi won’t be able to access any of your page content. Relevanssi doesn’t let you do that.

    The solution is probably to stop Relevanssi from interacting with that specific search. Unfortunately, I don’t understand what “my select2 search for a metabox ‘post’ field, configured as a custom user field” means. If this is something I can reproduce somehow without buying Metabox, I can look into this if you provide good instructions on how to reproduce this.

    Thread Starter ykf1

    (@ykf1)

    Oh ok so the _bricks_page_content_2 is supposed to be there! No worries, so it is not that one causing issue.

    For metabox, it was a custom user field, that is a search field for CPT. This would be the configuration:

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );

    function your_prefix_function_name( $meta_boxes ) {
    $prefix = '';

    $meta_boxes[] = [
    'title' => __( 'test', 'your-text-domain' ),
    'id' => 'test',
    'type' => 'user',
    'fields' => [
    [
    'name' => __( 'Post', 'your-text-domain' ),
    'id' => $prefix . 'Example',
    'type' => 'post',
    'post_type' => ['post'],
    'field_type' => 'select_advanced',
    'add_new' => false,
    'multiple' => false,
    'parent' => false,
    'required' => false,
    'clone' => true,
    'sort_clone' => false,
    'clone_default' => false,
    'clone_as_multiple' => false,
    'clone_empty_start' => false,
    'hide_from_rest' => false,
    'hide_from_front' => false,
    ],
    ],
    ];

    return $meta_boxes;}

    And with this box, you cannot search when relevanssi is activated. It loads the options, but the field search does not work.

    Plugin Author Mikko Saari

    (@msaari)

    Sorry, but I can’t reproduce the problem. The metabox works for me; I can use it to find posts without problems. Metabox does a regular search query, Relevanssi is or is not involved, and I get results. I checked, and Relevanssi shouldn’t stop this query.

    Is Relevanssi enabled for admin searches?

    Thread Starter ykf1

    (@ykf1)

    Ok thanks for checking! It must be a configuration I set up in Relevanssi then as when I disable the plugin, the problem disappears. The issue is both on frontend forms and in backend admin. Admin search is enabled – is that a problem ?

    • This reply was modified 5 days, 19 hours ago by ykf1.
    Plugin Author Mikko Saari

    (@msaari)

    Probably not (it didn’t have any effect when I tested this), but you can try disabling it to see if that helps.

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