• Resolved tatof

    (@tatof)


    Hello, I see shortpixel has unimlited packages now, so i want to switch back from imagify. I installed shortpixel and removed imagify. Now i have with one client and fatal error:

    [Tue Apr 23 13:59:03.629991 2024] [lsapi:error] [pid 12627:tid 140679964980992] [client 2a02:a44f:be30:1:4e2b:1a76:8bb4:a5d1:50012] [host website.nl] Backend fatal error: PHP Fatal error:  Uncaught Error: Call to a member function check() on bool in /home/website/domains/website.nl/public_html/site/plugins/shortpixel-image-optimiser/class/Controller/SettingsController.php:470\nStack trace:\n#0 /home/website/domains/website.nl/public_html/site/plugins/shortpixel-image-optimiser/class/Controller/SettingsController.php(460): ShortPixel\\Controller\\SettingsController->avifServerCheck()\n#1 /home/website/domains/website.nl/public_html/site/plugins/shortpixel-image-optimiser/class/Controller/SettingsController.php(84): ShortPixel\\Controller\\SettingsController->load_settings()\n#2 /home/website/domains/website.nl/public_html/site/plugins/shortpixel-image-optimiser/shortpixel-plugin.php(670): ShortPixel\\Controller\\SettingsController->load()\n#3 /home/website/domains/website.nl/public_html/wp-includes/class-wp-hook.php(324): ShortPixel\\ShortPixelPlugin->route()\n#4 /home/website/domains/website.nl/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#5 /home/website/domains/website.nl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#6 /home/website/domains/website.nl/public_html/wp-admin/admin.php(259): do_action()\n#7 /home/website/domains/website.nl/public_html/wp-admin/options-general.php(10): require_once('/home/website/d...')\n#8 {main}\n  thrown in /home/website/domains/website.nl/public_html/site/plugins/shortpixel-image-optimiser/class/Controller/SettingsController.php on line 470\n, referer: https://website.nl/wp-admin/plugins.php?plugin_status=all&paged=1&s
    

    I tried to clear database of all shortpixel fields. but i cant uninstall the plugin and remove settings. Because every page by shortpixel == error.

    This does not happen with every client. Maybe its because of translatepress?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Pedro

    (@petredobrescu)

    Hello @tatof

    This error is very strange and we are not sure what’s causing it (hasn’t been reported until now). It appears that not all our plugin files are properly loaded. Here are a few things you could try:

    • if you are using Git or any other version control system, please ensure there aren’t files from our plugin which are ignored or excluded
    • completely uninstall our plugin, then reinstall it from scratch, ensuring all files are present
    • if none of the above works, can you try to set the DB option called wp-short-pixel-redirected-settings to the value 2 and let us know if it fixes the issue? (let us know if you need details about how to do that!)

    Thanks, I look forward to getting your confirmation about this!

    Thread Starter tatof

    (@tatof)

    Hey @petredobrescu,

    I removed shortpixel completely from de server and reuploaded all files. Version 5.5.5
    The wp-short-pixel-redirected-settings is all ready set to 2 so don’t think thats a fix.

    Do you have any other idea’s? This is the last client I want do move shortpixel ?? then im done

    Update:

    1. I disabled all plugins, only ACF and shortpixel. Same error
    2. I removed all “short pixel” related items from database options table
    3. Removed all plugin files & redirect setting to 2

    When i remove all database options and then activate the plugin i can go to the settings. But as soon as i save the “advanced settings” tab the plugin crashes again. (edit: that worked once.. tried it again, no luck)

    • This reply was modified 7 months ago by tatof.
    • This reply was modified 7 months ago by tatof.
    • This reply was modified 7 months ago by tatof.
    Plugin Author Pedro

    (@petredobrescu)

    Hello @tatof

    The error is still very mysterious, but we have added an additional check that should prevent it from fatally crashing. Can you please install the version below (on top of version 5.5.5), and tell me if it fixes the issue?

    https://shortpixel.com/downloads/shortpixel-image-optimiser-5.5.6-DEV01.zip

    Thanks, I look forward to getting your confirmation!

    Thread Starter tatof

    (@tatof)

    Hello,

    This problem happens now to all my clients/websites with shortpixel. (90 sites) The 5.5.6 Dev version doesn’t through a fatal error but it can’t bulk optimize. It doesn’t calculate. Also the media preview still shows 1 image and on some sites it still gives a “critical error” wordpress message.

    Could it be I don’t have my content in /wp-content/ but moved it to /site/ ? This should work with any plugin. ->

    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
        define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    }
    
    define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/site' );
    
    if(in_array($_SERVER['REMOTE_ADDR'], $whitelist)) {
        define( 'WP_CONTENT_URL', 'https://'.$_SERVER['HTTP_HOST'].'/site' );
    }else{
        define( 'WP_CONTENT_URL', 'https://'.$_SERVER['HTTP_HOST'].'/site' );
    }
    Plugin Support Gerard Blanco

    (@sixaxis)

    Thank you, tatof. We just saw your email, so we’ll continue there.

    Best,

    Thread Starter tatof

    (@tatof)

    thanks! ??

    Thread Starter tatof

    (@tatof)

    This problem is Fixed in version 5.6.0 update

    Plugin Author Pedro

    (@petredobrescu)

    And just to add some details, the errors were generated by what we call “Silent Mode” where the plugin doesn’t display any notifications at all. When that mode was enabled by its constant, some checks were missing and we added them in version 5.6.0.

    Thanks @tatof for reporting and helping us in getting it resolved!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error – Switching from imagify’ is closed to new replies.