Title: PHP Fatal error
Last modified: September 24, 2018

---

# PHP Fatal error

 *  Resolved [mikacns](https://wordpress.org/support/users/mikacns/)
 * (@mikacns)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/)
 * Hey,
 * I am getting the following error in server logs which causes posts/pages to go
   blank and display error 500 on the backend.
 * PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen()
   in /home/site3437823/public_html/wp-content/plugins/siteorigin-panels/inc/admin.
   php:1190
 * Is there anything I can do to fix it?

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

 *  Plugin Contributor [alexgso](https://wordpress.org/support/users/alexgso/)
 * (@alexgso)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718445)
 * Hi mikacns,
 * Really sorry about this issue!
    Can you please clarify what version of WordPress
   you’re using? I ask as I’ve checked the identified line and this issue should
   only really occur if you’re using a really old version of WordPress.
 * If you aren’t using an older version of WordPress, can you please clarify when
   and where this issue occurs? Does it happen when you try and edit posts? Does
   it happen when you try and adjust your portfolio settings?
 *  Thread Starter [mikacns](https://wordpress.org/support/users/mikacns/)
 * (@mikacns)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718481)
 * We’re using the latest version of WordPress. The issue only occurs when I update
   another plugin (WPSSO Core Pro), but their support is adamant that it’s actually
   Site Origin that’s causing the issue per following server log:
 *     ```
       2018/09/17 09:54:36 [error] 26402#26402: *17754 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/site3437823/public_html/wp-content/plugins/siteorigin-panels/inc/admin.php:1190
       Stack trace:
       #0 /home/site3437823/public_html/wp-includes/class-wp-hook.php(286): SiteOrigin_Panels_Admin->disable_gutenberg_for_panels_posts(true, 'post')
       #1 /home/site3437823/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(true, Array)
       #2 /home/site3437823/public_html/wp-content/plugins/gutenberg/lib/register.php(332): apply_filters('gutenberg_can_e...', true, 'post')
       #3 /home/site3437823/public_html/wp-content/plugins/wpsso/lib/com/util.php(1150): gutenberg_can_edit_post_type('post')
       #4 /home/site3437823/public_html/wp-content/plugins/wpsso/lib/admin.php(91): SucomUtil::is_doing_block_editor()
       #5 /home/site3437823/public_html/wp-content/plugins/wpsso/wpsso.php(365): WpssoAdmin->__construct(Object(Wpsso))
       #6 /home/site3437823/public_html/wp-includes/class-wp-hook.php(286): Wpsso->set_objects('')
       ```
   
 * I am wondering if there is a conflict between the two plugins.
 * It happens when their plugin is updated and I try to access/edit any post/page
   or even Woocommerce order (custom post type). Everything on the front end works
   fine.
 * They suggested you check the DOING_CRON and DOING_AJAX constants – as the function
   you are calling is not always loaded by WordPress.
 *  Plugin Contributor [alexgso](https://wordpress.org/support/users/alexgso/)
 * (@alexgso)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718527)
 * Hi Mikacns,
 * Thank you for clarifying.
    Okay so based on what you outlined, it sounds like
   this error isn’t directly visible on frontend and occurs as a result of some 
   Ajax WPSSO Core Pro uses. Is that correct?
 * I’ve forwarded your post to the development team.
 *  Thread Starter [mikacns](https://wordpress.org/support/users/mikacns/)
 * (@mikacns)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718533)
 * Yes, that is correct. Much appreciated.
 *  [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * (@jsmoriss)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718578)
 * FYI – The following should give you all the information you need:
 *     ```
       2018/09/17 09:54:36 [error] 26402#26402: *17754 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/site3437823/public_html/wp-content/plugins/siteorigin-panels/inc/admin.php:1190
       Stack trace:
       #0 /home/site3437823/public_html/wp-includes/class-wp-hook.php(286): SiteOrigin_Panels_Admin->disable_gutenberg_for_panels_posts(true, 'post')
       #1 /home/site3437823/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(true, Array)
       #2 /home/site3437823/public_html/wp-content/plugins/gutenberg/lib/register.php(332): apply_filters('gutenberg_can_e...', true, 'post')
       ```
   
 * You’ve hooked the gutenberg_can_edit_post_type filter and called a WordPress 
   function that does not exist.
 * js.
 *  [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * (@jsmoriss)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10718594)
 * FYI #2 – Just because is_admin() is true, does not mean ALL admin related functions(
   like get_current_screen) are available – is_admin() is also true for Ajax and
   cron jobs – where there is no browser involved – and of course, Gutenberg does
   a lot of Ajax calls. 😉
 * js.
 *  Plugin Support [Andrew Misplon](https://wordpress.org/support/users/misplon/)
 * (@misplon)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10749155)
 * Thanks for the feedback. A fix will be included in the next Page Builder update:
   
   [https://github.com/siteorigin/siteorigin-panels/commit/4e320a77f7a84f9c479fbb081dadb436cfac06ee](https://github.com/siteorigin/siteorigin-panels/commit/4e320a77f7a84f9c479fbb081dadb436cfac06ee)
 * All the best.

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

The topic ‘PHP Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/siteorigin-panels/assets/icon.svg?rev=2556869)
 * [Page Builder by SiteOrigin](https://wordpress.org/plugins/siteorigin-panels/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/siteorigin-panels/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/siteorigin-panels/)
 * [Active Topics](https://wordpress.org/support/plugin/siteorigin-panels/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/siteorigin-panels/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/siteorigin-panels/reviews/)

## Tags

 * [error 500](https://wordpress.org/support/topic-tag/error-500/)
 * [PHP Fatal error](https://wordpress.org/support/topic-tag/php-fatal-error/)

 * 7 replies
 * 4 participants
 * Last reply from: [Andrew Misplon](https://wordpress.org/support/users/misplon/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-151/#post-10749155)
 * Status: resolved