Support » Plugin: Smush - Lazy Load Images, Optimize & Compress Images » WordPress caught an error with one of your plugins, Smush

  • Resolved findyourenglishschool

    (@findyourenglishschool)


    I have used Smush for a year, and today I received the email from WordPress that says “Your Site is Experiencing a Technical Issue. WordPress caught an error with one of your plugins, Smush.”

    I can log into my WordPress admin page, but I cannot go to Smush setting page. It says “There has been a critical error on your website. Please check your site admin email inbox for instructions.”

    Do you have any advice to fix it?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @findyourenglishschool,

    Sorry to hear you’re having issues with Smush, that admin message often means that there’s some fatal error happening on a page and debug log should be able to give us more info on what’s causing it.

    You can enable debug log in your wp-config.php file (located in root WP folder) by replacing define(‘WP_DEBUG’, false); with this code:

    // 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( 'log_errors', 1 );
    @ini_set( 'display_errors', 0 );

    Visit Smush page again so that the error is shown and this should create debug.log file in your wp-content folder that could tell us what is going on.
    Can you upload it to any file sharing service like GDrive or Dropbox and share the download link here so we can check them out and hopefully it will give us a clue on what’s causing it.

    Cheers,
    Predrag

    findyourenglishschool

    (@findyourenglishschool)

    Thank you for your help! I got the following debug log. Is it enough to find the cause?

    [21-Oct-2020 20:52:39 UTC] PHP Notice: wp_deregister_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the admin-bar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home2/findyps3/public_html/wp-includes/functions.php on line 5225

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @findyourenglishschool

    It is only a Notice, shouldn’t cause the fatal error.

    Are you using the latest plugin, WordPress and PHP versions?

    Could you also try to update the following lines to:

    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', tur);
    @ini_set( 'log_errors', 1 );
    @ini_set( 'display_errors', 1 );

    This should show the error on the front end too.

    Then check if you can see any fatal error message,

    Remember to remove the debug defines after running the debug.

    Let us know the result you got.
    Best Regards
    Patrick Freitas

    findyourenglishschool

    (@findyourenglishschool)

    Thank you for your help! I am using WordPress 5.5.1 and PHP 7.3.23. Smush version is 3.7.1. I got the following error message.

    Notice: wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the admin-bar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home2/findyps3/public_html/wp-includes/functions.php on line 5225

    Notice: wp_deregister_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the admin-bar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home2/findyps3/public_html/wp-includes/functions.php on line 5225

    Warning: Cannot modify header information – headers already sent by (output started at /home2/findyps3/public_html/wp-includes/functions.php:5225) in /home2/findyps3/public_html/wp-includes/functions.php on line 6270

    Warning: Cannot modify header information – headers already sent by (output started at /home2/findyps3/public_html/wp-includes/functions.php:5225) in /home2/findyps3/public_html/wp-admin/includes/misc.php on line 1310

    Warning: Cannot modify header information – headers already sent by (output started at /home2/findyps3/public_html/wp-includes/functions.php:5225) in /home2/findyps3/public_html/wp-admin/admin-header.php on line 9

    Fatal error: Maximum execution time of 30 seconds exceeded in /home2/findyps3/public_html/wp-content/plugins/wp-smushit/core/class-stats.php on line 777

    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Plugin Support Prathamesh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @findyourenglishschool,

    I tried to replicate the same with the same PHP version, WordPress 5.5.1, and Smush version is 3.7.1 but could not replicate it on our end. Looking at the debug log, look like this could be caused by some other plugin. Could you take a backup of your site, disable all the plugins and then enable smush plugin and check if that works for you?

    If that does, enable other plugins one by one to check when the error occurs again. Once the issue occurs again after enabling one of your plugins in the list, that should be the conflicting plugin.

    Do let me know how that works for you.

    Thank you,
    Prathamesh Palve

    findyourenglishschool

    (@findyourenglishschool)

    Actually I did what you mentioned before asking for your help. I saw the same error message with Twenty Seventeen theme and Smush plugin only.

    From yesterday, suddenly Smush started working normally although I did not make any changes! I did not do anything, but everything is back to normal now.

    I can’t tell you the cause of this error, but thank you for your help!

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @findyourenglishschool

    Thank you for the update.

    From the log:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home2/findyps3/public_html/wp-content/plugins/wp-smushit/core/class-stats.php on line 777

    I also suggest taking a look at your server configuration.

    Make sure to run on the PHP 7.4 and the PHP modules suggested by WordPress are installed, you can find it on WordPress > Tools > Site Health.

    It is a nice idea to increase the max execution time and PHP memory limit, you can follow this guide https://premium.wpmudev.org/blog/increase-memory-limit/

    Best Regards
    Patrick Freitas

    findyourenglishschool

    (@findyourenglishschool)

    Thank you again for your advice!

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @findyourenglishschool

    I hope you are doing well.

    You are welcome, I’ll mark this ticket as resolved, however, feel free to open it or reply if you have any further question.

    Best Regards
    Patrick Freitas

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.