• Resolved spooniverse

    (@spooniverse)


    I use the plugin on many websites and have actually no problems. Only on one website, since the update to PHP 8.0, there is a critical error when I open a post in a CPT. The overview of all posts loads as usual, but when I select a post in the post overview I get the WordPress error page “There was a critical error on your site…”.

    I read the thread on “Get critical error on site while activate CPT UI plugin” from krishanp69 and tried to adopt the solutions there. Unfortunately without success.

    Any idea what the problem could be? I already deactivated all plugins, but that didn’t help. I would be happy for a reply. Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Without knowing what the actual error is, I can’t really help much.

    Did you get an email with the error in question at the time? Or are you able to access your error log area in your hosting?

    Thread Starter spooniverse

    (@spooniverse)

    Hey Michael,

    I am sorry I didn’t explain, that my problem is, that I can’t really specify the problem any further. I get no mail, even if the error message says so. In frontend everything works fine. It is only impossible to load a post within a CPT from the backend. Which is kind of odd. Any idea how I can give you more information for finding the error? On the server runs a PLESK install I am able to access but am no administrator of. Problem occurs since I updated from PHP 7.4 to PHP 8.0

    Thank you for your fast reply! All the best, Daniel

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    You’re going to need to find ways to get to error logs inside plesk or if you at least have access to the server via SFTP and whatnot, you could make use of https://ww.wp.xz.cn/documentation/article/debugging-in-wordpress/

    Thread Starter spooniverse

    (@spooniverse)

    Thank you for pointing me towards a solution. The log file says (for two CPTs):

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "angebot" not found or invalid function name in /wordpress/wp-includes/class-wp-hook.php:308 Stack trace: #0 /wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #1 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /wordpress/wp-admin/includes/meta-boxes.php(1616): do_action() #3 /wordpress/wp-admin/edit-form-advanced.php(271): register_and_do_post_meta_boxes() #4 /wordpress/wp-admin/post.php(206): require('...') #5 {main} thrown in /wordpress/wp-includes/class-wp-hook.php on line 308
    
    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "team" not found or invalid function name in /wordpress/wp-includes/class-wp-hook.php:308 Stack trace: #0 /wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #1 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /wordpress/wp-admin/includes/meta-boxes.php(1616): do_action() #3 /wordpress/wp-admin/edit-form-advanced.php(271): register_and_do_post_meta_boxes() #4 /wordpress/wp-admin/post.php(206): require('...') #5 {main} thrown in /wordpress/wp-includes/class-wp-hook.php on line 308
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    By chance do the post types in question have values filled in for the “Metabox callback” field ? If yes, you’ll want to get those removed, unless you’re intentionally trying to create custom metabox output for the post types in question.

    If that’s the case where you are trying that, then the PHP code isn’t managing to find the function callback to use.

    Thread Starter spooniverse

    (@spooniverse)

    Hey Michael, that did the trick. I can open the posts again, no problem with PHP or whatsoever, just deleted the values in the “Metabox callback” field (did not use them anyways). Thanks a lot!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Awesome.

    Glad we got that figured out.

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

The topic ‘Critical Error opening a CPT post’ is closed to new replies.