Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #1406190


    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:

    Here’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' ) )

    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 179

    If this can be rectififed that would be great!




    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,


    Is this due to changes between WP 6.1.1 and 6.2?


    After 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.



    Please check the error log and let us know the error you are getting. Please also see

    If you’d like us to look into it, please post temporary WP admin and FTP logins here privately.


    • This reply was modified 1 year ago by Yigit.

    yes please help me.


    Hi @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.



    Quick question for everyone. Are you using the Enfold theme directly, or as a parent theme to a custom child theme?


    Hi Jason,

    Yes, please feel free to do so. I couldn’t reproduce the issue on my local and live installations.



    For 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?


    Thank you stop0bit you save my day!



    Sorry for the problem and for reporting this.

    The final fix will be:

    	if( function_exists( 'did_filter' ) && did_filter( 'after_setup_theme' ) )

    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,



    Fix above is not working properly.
    Meanwhile please stick to the fix from @stop0bit.

    Next release will contain a better solution.

    Best regards,

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘5.6 vs 5.5 upgrade breaks site – functions.php avia_lang_setup();’ is closed to new replies.