Support » Plugin: Raw HTML » PHP Fatal Error

  • maddentim

    (@maddentim)


    Since updating raw-html to 1.6 and WordPress to 5.2, we are seeing some PHP fatal errors with raw-html referenced. I am the site developer so I did not experience the error directly, just saw it in the log. It has not been reported by a user, but I always take php errors seriously (at least in production 🙂 )

    Let me know if you need more info. Here is a stack trace:

    [20-May-2019 04:21:03 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function use_block_editor_for_post_type() in /.../wp_us/wp-admin/includes/class-wp-screen.php:328
    Stack trace:
    #0 /.../wp_us/wp-admin/includes/template.php(2391): WP_Screen::get('post')
    #1 /.../wp_us/wp-content/plugins/raw-html/include/screen-options/screen-options.php(101): convert_to_screen('post')
    #2 [internal function]: wsScreenOptions14->page_to_screen_id('post')
    #3 /.../wp_us/wp-content/plugins/raw-html/include/screen-options/screen-options.php(77): array_map(Array, Array)
    #4 /.../wp_us/wp-includes/class-wp-hook.php(286): wsScreenOptions14->populate_page_panels(Object(WP_Screen))
    #5 /.../wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    #6 /.../wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #7 /.../wp-admin/includes/class-wp-screen.php(411): do_action('current_screen', Object(WP_Screen))
    #8 /... in /.../wp-admin/includes/class-wp-screen.php on line 328
    
    • This topic was modified 6 months ago by maddentim.
Viewing 1 replies (of 1 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Thank you for the report. I can’t seem to reproduce this error on my test site, which leads me to think that either it’s a plugin compatibility issue or there might be something wrong with the WordPress installation (like a failed upgrade).

    Here are some ideas:

    • Make sure that the “Classic Editor” plugin is up to date. I’ve seen reports that older versions of this plugin had a bug that could cause similar fatal errors.
    • If the site is still running the Gutenberg plugin, try deactivating it. It’s no longer necessary in WP 5.2.
    • It sounds like this file could be out of date: /wp-admin/includes/post.php. Can you check if it contains a function named use_block_editor_for_post_type? If it doesn’t then the file probably didn’t get updated properly when installing WP 5.2. Try reinstalling WP 5.2.
    • Finally, there’s a small chance that it could be a caching issue. Try clearing the PHP opcode cache and/or restarting the web server.
Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal Error’ is closed to new replies.