Title: Issue with a specific term
Last modified: January 23, 2023

---

# Issue with a specific term

 *  Resolved [devwam](https://wordpress.org/support/users/devwam/)
 * (@devwam)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/)
 * Hi,
 * I have a problem that makes me crazy. I hope you can help me to fix it 🙂
 * The search works good, **BUT** when I try with the term “life”, it crashes…
 * There is one page with the name “Life NaturArmy” and another with the term “life”
   in the content.
 * I tried to use the Relevanssi admin search but the problem is still there. Here
   is some things I finded with the admin search:
    - Term “life”, post type “all”, posts per page “all” => **CRASH**
    - Term” life”, post type “page” (or another specific post type), posts per page“
      all” => **OK**
    - Term “life”, post type “all”, posts per page “10” => **OK**
    - Term “test”, post type “all”, posts per page “all” => **OK**
 * I tried to delete the page but nothing change.
 * If you have any idea, I’ll take it!
 * WP version: 6.1.1
   Relevanssi version: 4.18.2
 * Thanks for your help 🙏

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

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399142)
 * Can you find out the exact error message that gets reported when the site crashes?
   There should be something in the server PHP error logs. That would solve this
   problem.
 * Does it help if you disable custom excerpts in the Relevanssi settings?
 *  Thread Starter [devwam](https://wordpress.org/support/users/devwam/)
 * (@devwam)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399201)
 * I have an error 500 in the console log, and on the front I got this:
 *     ```wp-block-code
       Fatal error: Uncaught Error: Object of class WP_Post could not be converted to string
       in [...]/wp-includes/kses.php on line 1686
       ```
   
 * > Does it help if you disable custom excerpts in the Relevanssi settings?
 * No, it doesn’t help
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399253)
 * Can you get the full stack trace of the error, so I could see how it is related
   to Relevanssi? That message is, unfortunately, so generic that it doesn’t help.
 *  Thread Starter [devwam](https://wordpress.org/support/users/devwam/)
 * (@devwam)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399274)
 * Here is:
 *     ```wp-block-code
       Pile d’appel :
   
           preg_replace()
           wp-includes/kses.php:1686
           wp_kses_no_null()
           wp-includes/kses.php:718
           wp_kses()
           wp-content/plugins/display-a-meta-field-as-block/meta-field-block.php:70
           meta_field_block_render_block()
           wp-includes/class-wp-block.php:256
           WP_Block::render()
           wp-includes/class-wp-block.php:242
           WP_Block::render()
           wp-includes/class-wp-block.php:242
           WP_Block::render()
           wp-includes/class-wp-block.php:242
           WP_Block::render()
           wp-includes/class-wp-block.php:242
           WP_Block::render()
           wp-includes/blocks/post-template.php:95
           render_block_core_post_template()
           wp-includes/class-wp-block.php:256
           WP_Block::render()
           wp-includes/class-wp-block.php:242
           WP_Block::render()
           wp-includes/blocks.php:1051
           render_block()
           wp-includes/blocks.php:1089
           do_blocks()
           wp-includes/class-wp-hook.php:308
           WP_Hook::apply_filters()
           wp-includes/plugin.php:205
           apply_filters()
           wp-content/plugins/relevanssi/lib/excerpts-highlights.php:138
           relevanssi_do_excerpt()
           wp-content/plugins/relevanssi/lib/excerpts-highlights.php:1548
           relevanssi_add_excerpt()
           wp-content/plugins/relevanssi/lib/search.php:694
           relevanssi_do_query()
           wp-content/plugins/relevanssi/lib/search.php:84
           relevanssi_query()
           wp-includes/class-wp-hook.php:308
           WP_Hook::apply_filters()
           wp-includes/plugin.php:256
           apply_filters_ref_array()
           wp-includes/class-wp-query.php:3097
           WP_Query::get_posts()
           wp-includes/class-wp-query.php:3749
           WP_Query::query()
           wp-includes/class-wp.php:663
           WP::query_posts()
           wp-includes/class-wp.php:783
           WP::main()
           wp-includes/functions.php:1332
           wp()
           wp-blog-header.php:16
           require()
           index.php:17
       ```
   
 * I use the plugin “Meta Field Block” to display ACF’s field but I use this code
   to block his interpretation:
 *     ```wp-block-code
       add_filter( 'relevanssi_block_to_render', 'rlv_no_core_image_blocks' );
       function rlv_no_core_image_blocks( $block ) {
         if ( 'mfb/meta-field-block' === $block['blockName'] ) {
           return null;
         }
         return $block;
       }
       ```
   
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399813)
 * Indeed, this points at there being a problem with this particular block in the
   Relevanssi excerpts. The problem should go away if you disable the Relevanssi
   custom excerpts, though. What’s the stack trace like when you get this error 
   with Relevanssi excerpts disabled?
 * The `relevanssi_block_to_render` filter hook is only applied in indexing; Relevanssi
   in general doesn’t explicitly render blocks in excerpt-building. As you can see
   in the stack trace, the block rendering starts with `apply_filters()`.
 * One solution to this would be to add a filter on `[relevanssi_pre_excerpt_content](https://www.relevanssi.com/user-manual/filter-hooks/relevanssi_pre_excerpt_content/)`
   to remove the block from the post content before Relevanssi runs `apply_filters()`
   to expand it.
 *  Thread Starter [devwam](https://wordpress.org/support/users/devwam/)
 * (@devwam)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399968)
 * Oh! My bad, I was looking at the wrong setting.
 * Indeed, if I uncheck this parameter, the search works!
 * Thanks a lot for your rapidity and your advices!

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

The topic ‘Issue with a specific term’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [devwam](https://wordpress.org/support/users/devwam/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/issue-with-a-specific-term/#post-16399968)
 * Status: resolved