![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
Tagged: Break on upgrade, fatal error
-
AuthorPosts
-
May 2, 2023 at 3:02 pm #1406190
Hello,
There is a change to functions.php between 5.5 and 5.6 versions, around line(s): 179 to 184.
The new code about language setup seems to break the site on upgrade between versions, I have fixed the problem by changing the code as below. Now the site loads the backend with my change after upgrade by simply reloading this url: https://staging.sheilds.org/wp-admin/update-core.phpHere’s the new lines with a simple fix, I placed above:
avia_lang_setup(); //Replaced this line and commented out the below lines, as was breaking site on upgrade from 5.5 to 5.6 /*if( did_filter( 'after_setup_theme' ) ) { avia_lang_setup(); }*/
Here’s the error I received:
Fatal error: Uncaught Error: Call to undefined function did_filter() in /pathtoinstall/wp-content/themes/enfold/functions.php:179 Stack trace: #0
/pathtoinstall/wp-settings.php(555): include() #1
/pathtoinstall/wp-config.php(121): require_once(‘/var/www/vhosts…’) #2
/pathtoinstall/wp-load.php(50): require_once(‘/var/www/vhosts…’) #3
/pathtoinstall/wp-admin/admin.php(34): require_once(‘/var/www/vhosts…’) #4
/pathtoinstall/wp-admin/index.php(10): require_once(‘/var/www/vhosts…’) #5
{main} thrown in /pathtoinstall/wp-content/themes/enfold/functions.php on line 179If this can be rectififed that would be great!
Thanks
May 2, 2023 at 3:35 pm #1406193Hey!
Thanks for the report.
I updated Enfold using the auto-update function in WP but I couldn’t reproduce this issue.
Which version of PHP and WP are you using? Are you using a child theme and if you are, was it the active theme when you updated Enfold?
Please share more details so we can try to reproduce the issue.
Best regards,
YigitMay 2, 2023 at 4:24 pm #1406208Is this due to changes between WP 6.1.1 and 6.2?
May 2, 2023 at 4:34 pm #1406210After updating to 5.6, my “HOME” page no longer works. When I go to edit mode I get the message:
Es gab einen kritischen Fehler auf deiner Website. Bitte überprüfe den Posteingang deiner Website-Administrator-E-Mail-Adresse für weitere Anweisungen.
Erfahre mehr über die Problembehandlung in WordPress.
May 2, 2023 at 5:02 pm #1406214Hi,
@liebherz55 Please check the error log and let us know the error you are getting. Please also see https://wordpress.org/documentation/article/debugging-in-wordpress/.If you’d like us to look into it, please post temporary WP admin and FTP logins here privately.
Regards,
Yigit-
This reply was modified 1 year, 4 months ago by
Yigit.
May 2, 2023 at 5:06 pm #1406217yes please help me.
May 2, 2023 at 5:12 pm #1406219Hi @liebherz55,
Please share FTP logins privately as well. If you do not know your FTP credentials, you can contact your hosting provider and they can assist you with that.
Regards,
YigitMay 2, 2023 at 5:15 pm #1406221Quick question for everyone. Are you using the Enfold theme directly, or as a parent theme to a custom child theme?
May 2, 2023 at 5:21 pm #1406222Hi Jason,
Yes, please feel free to do so. I couldn’t reproduce the issue on my local and live installations.
Regards,
YigitMay 2, 2023 at 6:11 pm #1406228For those experiencing problems with Enfold 5.6, what version of WordPress is everyone here running?
Is your Enfold running as the main theme? (On the left sidebar as Enfold)
Or are you running a child theme with Enfold as the parent theme?
What language is your default?May 3, 2023 at 11:03 am #1406316Thank you stop0bit you save my day!
May 3, 2023 at 11:56 am #1406327Hi,
Sorry for the problem and for reporting this.
The final fix will be:
if( function_exists( 'did_filter' ) && did_filter( 'after_setup_theme' ) ) { avia_lang_setup(); }
We had to add this check with 5.6 to avoid double calling of avia_lang_setup which results in a large hit in WP object cache since WP 6.1 (due to new added class WP_Textdomain_Registry).
Best regards,
GünterMay 3, 2023 at 5:18 pm #1406363 -
This reply was modified 1 year, 4 months ago by
-
AuthorPosts
- The topic ‘5.6 vs 5.5 upgrade breaks site – functions.php avia_lang_setup();’ is closed to new replies.