• Goodmorning, I updated from version 4.9 to 5.3 and wp_insert_post fails:

    Fatal error: Uncaught Error: Call to undefined function filter_block_content() in /var/www/html/wp-includes/formatting.php:4924 Stack trace: #0 /var/www/html/wp-includes/class-wp-hook.php(288): wp_pre_kses_block_attributes(”, ‘post’, Array) #1 /var/www/html/wp-includes/plugin.php(206): WP_Hook->apply_filters(”, Array) #2 /var/www/html/wp-includes/kses.php(914): apply_filters(‘pre_kses’, ”, ‘post’, Array) #3 /var/www/html/wp-includes/kses.php(737): wp_kses_hook(”, ‘post’, Array) #4 /var/www/html/wp-includes/kses.php(1924): wp_kses(”, ‘post’) #5 /var/www/html/wp-includes/class-wp-hook.php(288): wp_filter_post_kses(”) #6 /var/www/html/wp-includes/plugin.php(206): WP_Hook->apply_filters(”, Array) #7 /var/www/html/wp-includes/post.php(2443): apply_filters(‘content_save_pr…’, ”) #8 /var/www/html/wp-includes/post.php(2328): sanitize_post_field(‘post_content’, ”, 0, ‘db’) #9 /var/www/html/wp-includes/post.php(3583): sanitize_post(Array, ‘db’) #10 /var/www/html/wp-content/themes/luoghicomuni/functions.php(163): wp_inser in /var/www/html/wp-includes/formatting.php on line 4924

    I think a patch is needed for this problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • It looks like this might be a problem with your theme trying to call the filter_block_content function. Try updating your theme or temporarily try a different theme to see if the problem persists.

    Thread Starter lellomaverick

    (@lellopalumbo)

    Hi Tim and thank you for your answer, in my theme there isn’t a call to filter_block_content function but I think that it is called by wp_insert_post not directly. I can’t try another theme because I use wp_insert_post in frontend of my website.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error wp_insert_post – WP 5.3.2’ is closed to new replies.