• Resolved lfbender

    (@lfbender)


    Hi, thank you for your work on this excelent plugin.

    I have the following problem:

    Relevanssi finds 2065 posts and gets stuck at 145 every single time.
    I am indexing posts with ‘some custom fields’.
    I tried:
    1) Index unindexed posts.
    2) Build index from scratch.
    3) Reducing the number of custom fields to be indexed.

    Right now I have 24 custom fields to be indexed on my custom post type.

    I put this into functions.php, to see relevansi errors in the error.log:

    add_filter( 'relevanssi_indexing_query', 'rlv_test_indexing_query' );
    function rlv_test_indexing_query( $query ) {
        error_log( $query );
        return $query;
    }

    This revealed the following type of error:

    2021/12/06 10:59:09 [error] 3393#3393: *142313 FastCGI sent in stderr: "PHP message: SELECT post.ID
    FROM wpnq_posts post
    LEFT JOIN wpnq_posts parent ON (post.post_parent=parent.ID)
    LEFT JOIN wpnq_relevanssi r ON (post.ID=r.doc)
    WHERE
    r.doc is null
    AND
    (post.post_status IN ('publish','draft','private','pending','future')
    OR
    (post.post_status='inherit'
    AND(
    (parent.ID is not null AND (parent.post_status IN ('publish','draft','private','pending','future')))
    OR (post.post_parent=0)
    )
    )
    )
    AND post.post_type IN ('page', 'machines') ORDER BY post.ID DESC LIMIT 150PHP message: PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in /www/usedbottlinglinescom_759/public/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php:2933
    Stack trace:
    #0 /www/usedbottlinglinescom_759/public/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-select.php(607): acf_maybe_get(Array, Array, Array)
    #1 /www/usedbottlinglinescom_759/public/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-select.php(590): acf_field_select->format_value_single(Array, 451614, Array)
    #2 /www/usedbottlinglinescom_759/public/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-checkbox.php(564): acf_field_select->format_value(Array, 451614, Array)
    #3 /www/usedbottlinglinescom_759/public/wp-includes/class-wp-hook.php(303): acf_field_checkbox->format_value(Array, 451614, Array)
    #4 /www/usedbottlinglinescom_759/public/wp-includes/plugin.php(233): WP_Hook->apply_filters(Array, Array" while reading response header from upstream, client: 93.34.237.187, server: www.usedbottlinglines.com, request: "POST /wp-admin/admin-ajax.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php8.0-fpm-usedbottlinglinescom.sock:", host: "www.usedbottlinglines.com", referrer: "https://www.usedbottlinglines.com/wp-admin/options-general.php?page=relevanssi%2Frelevanssi.php&tab=indexing"

    Also I get a error code 500 error in the browser console for admin-ajax.php.

    Please advise how I can get all my custom posts indexed and searchable.

    • This topic was modified 4 years, 8 months ago by lfbender.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    The error isn’t coming from Relevanssi, it’s coming from ACF Pro. Based on the stack trace, the problem seems to be related to a field that has checkboxes. Since the indexing gets stuck at the same spot, the problematic field is in the next post in order (Relevanssi indexes posts find descending order, so if the lowest post ID indexed is 1000, the problem is in post 999, 998 or so on).

    Have you set Relevanssi to index any checkbox fields?

    Thread Starter lfbender

    (@lfbender)

    Yes, I have selected also checkbox fields for indexing.

    I did not think it would be a problem.

    And yes, removing the ckeckbox fields from the indexed custom fields unstuck the process.

    Thank you.

    So just to know: there is no way to index checkbox custom fields right now?

    Plugin Author Mikko Saari

    (@msaari)

    What do you want to index from the checkbox fields? You can use the relevanssi_custom_field_value filter hook to modify the custom field value so that it’s something Relevanssi can digest.

    Thread Starter lfbender

    (@lfbender)

    Thank you for this.
    I am reviewing what custom fields I actually want people to be able to find and I will test your filter accordingly.

    For now my immediate issue has been answered and resolved.

    Thank you for the fast and thorough help.

    🙂

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

The topic ‘Indexing gets stuck with acf error message in log’ is closed to new replies.