• Resolved Hal

    (@halburgissnet)


    I just upgraded WP and all plugins. Relevanssi is 4.13.3.1. The exact error is:

    Warning: call_user_func() expects parameter 1 to be a valid callback, function ‘00000000248ca2240000000058a0eca3’ not found or invalid function name in /etc/apache2/dbs/Sites/zeonchemicals/wp-content/plugins/relevanssi/lib/common.php on line 1386

    Other installed plugins:

    ` A adminimize 1.11.7
    A advanced-custom-fields-pro 5.10.2
    A classic-editor 1.6.2
    A dbs 1.7
    A gravityforms 2.5.10
    A relevanssi 4.13.3.1
    A tablepress 1.14
    A widget-context 1.3.2
    A wordpress-seo 17.2

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Hal

    (@halburgissnet)

    I found the cause but now have a question too. So our client wanted to make sure attachments did not show in the search results. So we now have this filter which seems to have worked, or at least not caused any php isues (and it is now causing the php Warning about call_user_func):

    add_filter( 'relevanssi_indexing_restriction', function ( $restriction ) {
    	global $wpdb;
    	$restriction .= " AND post.ID NOT IN (SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' ) ";
    	return $restriction;
    });

    In Settings under Indexing, “attachment” is not checked. But “Excluded from Search” says No. So, is there a better way to do this?

    • This reply was modified 2 years, 7 months ago by Hal.
    Plugin Author Mikko Saari

    (@msaari)

    The format of the filter has changed some time ago, that’s why it’s causing the error. See here for the filter hook instructions, but the function should be:

    add_filter( 'relevanssi_indexing_restriction', function ( $restriction ) {
    	global $wpdb;
    	$restriction['mysql'] .= " AND post.ID NOT IN (SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' ) ";
            $restriction['reason'] .= ' An attachment';
    	return $restriction;
    });

    However, there’s no reason to use a filter for this. Just uncheck attachment in the post types to index list; that’s much easier. The “Excluded from search” value has nothing to do with the Relevanssi search, it just tells how the post type is defined when it was created.

    Thread Starter Hal

    (@halburgissnet)

    Ah! Thank you! I was hoping that was the case. And thank for excellent support and very nice plugin too!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘call_user_func warning after upgrade’ is closed to new replies.