[WP Smush Pro] Fatal error - WP Smush Pro

Hi I'm getting a fatal error when using WP Smush Pro with Beaver Builder. Beaver builder works fine when I deactivate the smush plugin. When I launch Beaver Builder to edit a page, I get this error:

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/projectgodwitorg/public_html/wp-content/plugins/wp-smush-pro/lib/class-wp-smush-admin.php:341 Stack trace: #0 /home/projectgodwitorg/public_html/wp-includes/class-wp-hook.php(286): WpSmushitAdmin->enqueue('':wink: #1 /home/projectgodwitorg/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /home/projectgodwitorg/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/projectgodwitorg/public_html/wp-includes/media.php(3663): do_action('wp_enqueue_medi...':wink: #4 /home/projectgodwitorg/public_html/wp-content/plugins/bb-plugin/classes/class-fl-builder.php(683): wp_enqueue_media() #5 /home/projectgodwitorg/public_html/wp-includes/class-wp-hook.php(286): FLBuilder::enqueue_ui_styles_scripts('':wink: #6 /home/projectgodwitorg/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #7 /home/projectgodwitorg/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #8 in /home/projectgodwitorg/public_html/wp-content/plugins/wp-smush-pro/lib/class-wp-smush-admin.php on line 341

Thanks
Chris

  • Nahid

    Hey Chris !
    Hope you are having a great day!

    This issue has already been reported to our developers. It seems to be a conflict between the latest version of the WP Smush Pro and Beaver Builder plugins. The developers are working on fixing this in the next update on an urgent manner. In the mean time, you can try adding the following line of code in your theme's (most preferably, child theme's) functions.php file:

    require_once(ABSPATH . 'wp-admin/includes/screen.php');

    Alternatively, you can also put the code in a mu-plugin. That'll require you to paste the mentioned code in a PHP file that ends with the extension .php, e.g. "anyname.php". The mentioned code must have a "<?php" definition at the start of the file. This PHP file should be placed in {your root WordPress folder}/wp-content/mu-plugins (you'll need to create the folder named "mu-plugins" if it is not there already).

    Meanwhile, if you notice any update notification for WP Smush Pro plugin in WPMU DEV Dashboard, feel free to backup your site (files and database) and proceed with it, or set Automate do that for you!

    Hope this helps. Please let us know if this works for you. Thanks!

    Kind regards,
    Nahid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.