[WP Smush Pro] WP Smush Pro Fatal PHP error

I noticed Beaver Builder wasn't working right. I asked tech support for Beaver Builder and they said that WP Smush Pro is causing a fatal error - I have deactivated the plugin

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-content/plugins/wp-smush-pro/lib/class-wp-smush-admin.php:341

  • James Morris
    • WordPress Enthusiast

    Hello frank_gomez

    I hope you are well today.

    There's a couple troubleshooting steps I'd like you to try to see if we can narrow down the cause of this problem.

    First, could you please run a plugin conflict test to eliminate the possibility of a conflict with another plugin?

    Whenever you perform a plugin conflict test, it's always better to do so on a staging site. You can learn how to create a staging site here.

    The simplest way to perform a plugin conflict test:
    * Login to your site via FTP
    * Navigate to wp-content
    * Rename the plugins folder to _plugins
    * Create a new plugins folder
    * Move the plugin folder (ex: wp-smush-pro) you want to test from _plugins to plugins
    * Then, one at a time, move other plugin folders over from _plugins to plugins until the symptom returns

    NOTE: While you are doing this, do not visit WP Admin -> Plugins on your site. This will ensure that your plugins remain active when you copy them back over.

    If that does not lead to a solution, could you please enable WP_DEBUG and provide us with the output of your debug.log file?

    To enable WP_DEBUG, change the following line in your wp-config.php file:

    define('WP_DEBUG', false);

    To this:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    After you've visited the pages that are causing you problems, please go to wp-content/ on your server via FTP and download the debug.log file to your local computer. Then, open that file with a text editor like notepad (Windows), GEdit (Linux), or TextEdit (Mac). You can then save the file as a .txt file and upload it here as an attachment to your post.

    I look forward to seeing the results of your tests.

    Best regards,

    James Morris

  • frank_gomez
    • Recruit

    I never saw a debug log but using Beaver Builder to Debug I got the info below (NOTE I've tested removing all plugins EXCEPT Beaver Builder and WP Smush and WPMU DEV Dashboard) it is apparent that the conflict IS between those two plugins.
    Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-content/plugins/wp-smush-pro/lib/class-wp-smush-admin.php:341 Stack trace: #0 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/class-wp-hook.php(286): WpSmushitAdmin->enqueue('') #1 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/media.php(3663): do_action('wp_enqueue_medi...') #4 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(683): wp_enqueue_media() #5 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/class-wp-hook.php(286): FLBuilder::enqueue_ui_styles_scripts('') #6 /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #7 /home/wptec in /home/wptechguru/public_html/DAKINDAIRYFARMS/wp-content/plugins/wp-smush-pro/lib/class-wp-smush-admin.php on line 341

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.