Hi @parselearn
Sorry to hear you are having this issue.
Do you have any access to WordPress or not access at all?
If you don’t have any access, can you use the Hosting file manager or sFTP to access the WordPress folder > plugins, find the wp-smushit folder and remove it temporarily?
Before reinstalling the plugin, please let us know the WordPress version, language and PHP that your site uses, those information can be found at WordPress > Tools > Site Health.
Let us know the result you got.
Best Regards
Patrick Freitas
Thread Starter
Parsa
(@parselearn)
Your welcome
Yes, I rename folder from host file manager.
WP Version: 6.0.3
Language: Farsi
PHP Version: 7.4.8
Hi @parselearn
Thank you for response!
I understand that disabling plugin this way removed the error and gave you site back, right?
A quick workaround for now would be to downgrade plugin to previous version which doesn’t include the code that caused that issue. You can download the previous 3.11.1 version from here (form at the very bottom of the page):
https://wordpress.org/plugins/wp-smushit/advanced/
and installing it on site should not cause such issue again. It will not “unoptimize” your images so it can be used as a workaround.
I have also asked our developers for advice on the issue – why this is happening and how can we possibly fix it or what should be additionally checked on site – so please keep an eye on this ticket and we’ll update you with more information once we got feedback on this.
Kind regards,
Adam
Hi again @parselearn
I got updated from our developers on this!
They think you may be using this plugin on site:
https://wordpress.org/plugins/wp-persian/
Are you? If yes, apparently this plugin is causing some issue with date_create() function, which in turn causes the issue.
Aside from downgrading Smush, another workaround would be adding this code to the site as an MU plugin (and then re-enabling current Smush version) and it should also help:
<?php
add_action( 'admin_init', function() {
$banner_file = WP_SMUSH_DIR . 'core/external/blackfriday/banner.php';
if ( file_exists( $banner_file ) ) {
unlink( $banner_file );
}
});
To add code as MU plugin:
– create an empty file with a .php extension (e.g. “smush-bf-banner-fix.php”)
– copy and paste this code into it
– save the file and upload it to the /wp-content/mu-plugins/ folder of your site’s WordPress installation.
Best regards,
Adam
Thread Starter
Parsa
(@parselearn)
Thanks for your help
I use wp-parsidate, I think my plugin conflict with wp-smushit
Thanks for the code, I will use it.
This solution solved my problem.
Thanks