Sirajul Islam
Sirajul Islam

Reputation: 61

Uncaught TypeError: call_user_func_array(): Argument #1 ($function) must be a valid callback

https://i.sstatic.net/HdkBR.png

Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($function) must be a valid callback, class Wcore_Admin does not have a method "sitemap_exclude_post_type" in /var/www/html/wp-includes/class-wp-hook.php:292 Stack trace: #0 /var/www/html/wp-includes/plugin.php(212): WP_Hook->apply_filters() #1 /var/www/html/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php(276): apply_filters() #2 /var/www/html/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php(253): WPSEO_Post_Type_Sitemap_Provider->is_valid_post_type() #3 /var/www/html/wp-includes/class-wp-hook.php(294): WPSEO_Post_Type_Sitemap_Provider->save_post() #4 /var/www/html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #5 /var/www/html/wp-includes/plugin.php(484): WP_Hook->do_action() #6 /var/www/html/wp-includes/post.php(4384): do_action() #7 /var/www/html/wp-admin/includes/post.php(690): wp_insert_post() #8 /var/www/html/wp-admin/post-new.php(66): get_default_post_to_edit() #9 {main} thrown in /var/www/html/wp-includes/class-wp-hook.php on line 292 There has been a critical error on this website. Please check your site admin email inbox for instructions.

My server has been upgraded from PHP 7.4 to 8.0.8. I know it causes because of one of the plugins named wcore admin which was developed by custom. And It's required plugin to do our jobs. I'm looking for a way to fix the issues and maintain the script myself since I'm very happy with it.

Upvotes: 6

Views: 41621

Answers (4)

Sven Möller
Sven Möller

Reputation: 15

You're probably using New Relic.
When using New Relic in Php 8.0, at least with Litespeed or Cyberpanel I've been facing issues with Php and even Php reading wrong filenames.

The solution is to Restart php or change Php version.

Upvotes: 0

Mahesh Dubal
Mahesh Dubal

Reputation: 11

I have changed the php version to 7.4.30 and this solved my issue

Upvotes: 0

Hoàng Phú
Hoàng Phú

Reputation: 39

You should try

call_user_func_array([new $this->controller, $this->action], array $args);

Upvotes: 3

shawndfernandes
shawndfernandes

Reputation: 117

I faced same issue on upgrade to php8.0, the error shows steps to debug

'class Wcore_Admin does not have a method "sitemap_exclude_post_type"'

the plugin or file class name Wcore_Admin does not have a function named sitemap_exclude_post_type. Remove the line calling a missing function, and it should work

Upvotes: 2

Related Questions