Title: Fatal error when editing page
Last modified: October 10, 2022

---

# Fatal error when editing page

 *  Resolved [mkdev](https://wordpress.org/support/users/mkdev/)
 * (@mkdev)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-editing-page/)
 * I get this error, when I try to edit the page that contains the search block.(
   when I have Live search plugin active)
 * The plugin works on the frontend without issue, just when I edit that specific
   page is triggerd.
 * Fatal error: Uncaught TypeError: Argument 1 passed to Relevanssi_Live_Search_Form::
   modify_search_form() must be of the type string, null given, called in /public_html/
   wp-content/plugins/relevanssi-live-ajax-search/includes/class-relevanssi-live-
   search-form.php on line 173 and defined in /public_html/wp-content/plugins/relevanssi-
   live-ajax-search/includes/class-relevanssi-live-search-form.php:182 Stack trace:#
   0 /public_html/wp-content/plugins/relevanssi-live-ajax-search/includes/class-
   relevanssi-live-search-form.php(173): Relevanssi_Live_Search_Form->modify_search_form(
   NULL) #1 /public_html/wp-includes/class-wp-hook.php(309): Relevanssi_Live_Search_Form-
   >render_block(NULL, Array) #2 /public_html/wp-includes/plugin.php(191): WP_Hook-
   >apply_filters(NULL, Array) #3 /public_html/wp-includes/class-wp-bl in/public_html/
   wp-content/plugins/relevanssi-live-ajax-search/includes/class-relevanssi-live-
   search-form.php on line 182
    -  This topic was modified 3 years, 7 months ago by [mkdev](https://wordpress.org/support/users/mkdev/).
    -  This topic was modified 3 years, 7 months ago by [mkdev](https://wordpress.org/support/users/mkdev/).

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

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-editing-page/#post-16084567)
 * I tried reproducing this problem, but I cannot. I can edit a page with a search
   form block without problems. Looks like the function in Relevanssi Live Ajax 
   Search that edits the search form is getting a null value when it should get 
   a string that contains the search form HTML. Is it possible some third party 
   is interfering here?
 * Anyway, for a fix, I was thinking of modifying the `render_block()` function 
   in `/wp-content/plugins/relevanssi-live-ajax-search/includes/class-relevanssi-
   live-search-form.php` to this:
 *     ```
       public function render_block( $block_content, $block ) {
       	if ( ! $block_content || is_admin() || 'core/search' !== $block['blockName'] ) {
       		return $block_content;
       	}
       	$block_content = $this->modify_search_form( $block_content );
       	return $block_content;
       }
       ```
   
 * This should fix the problem.
 *  Thread Starter [mkdev](https://wordpress.org/support/users/mkdev/)
 * (@mkdev)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-editing-page/#post-16087610)
 * [@msaari](https://wordpress.org/support/users/msaari/) modifying the render_block
   does the job! (no more error when editing)
 * It could a third-party interference in my case (it’s not a fresh install), but
   I haven’t drilled down to find the one causing it.
    -  This reply was modified 3 years, 7 months ago by [mkdev](https://wordpress.org/support/users/mkdev/).
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-editing-page/#post-16087620)
 * Ok, very good. I’ll include this fix in the next version of the plugin.

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

The topic ‘Fatal error when editing page’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-editing-page/#post-16087620)
 * Status: resolved