• After updating to WP 4.6, Polylang causea a fatal memory exhaustion error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/eigenwi2/public_html/wp-includes/plugin.php on line 41

    It is not a plugin conflict, because the error also occurs when Polylang is the only activated plugin. Maybe it is a theme conflict?

    I use The latest Divi theme version which is also just updated.

    The allocated memory in wp-includes/plugin.php is 256mb

    Any ideas on how to solve this are very welcome, thanks.

    https://www.ads-software.com/plugins/polylang/

Viewing 13 replies - 16 through 28 (of 28 total)
  • same here. previous version was 2.0.2, WP 4.5.3 and newest Divi. i’m going to ask them to fix this ASAP

    Two threads open there. Added my bit to them, but no useful response yet.

    Plugin Author Chouby

    (@chouby)

    i’m going to ask them to fix this ASAP

    We don’t know yet who has to fix what. We just know that there is conflict between latest versions of WP + Divi + Polylang.

    Someone on the elegantthemes.com forums figured it out. There’s an infinite loop happening:

    Into file : wp-includes\l10n.php
    into the function get_locale()

    the line number 41 :
    return apply_filters( ‘locale’, $locale );

    calls into an infinite loop with the
    add_filter( ‘locale’, ‘et_divi_maybe_change_frontend_locale’ );

    So I disable the line
    add_filter( ‘locale’, ‘et_divi_maybe_change_frontend_locale’ );

    into the file wp-content\themes\Divi\functions.php arround line 8441

    to avoid call and call until crash of PHP or Apache I don’t know.

    Plugin Author Chouby

    (@chouby)

    Could you share the code of the function et_divi_maybe_change_frontend_locale?

    function et_divi_maybe_change_frontend_locale( $locale ) {
            $option_name   = 'divi_disable_translations';
            $theme_options = get_option( 'et_divi' );
    
            $disable_translations = isset ( $theme_options[ $option_name ] ) ? $theme_options[ $option_name ] : false;
    
            if ( 'on' === $disable_translations ) {
                    return 'en_US';
            }
    
            return $locale;
    }

    too slow ?? you already got what you need it seems

    Thanks!! Fixed the same problem with these posts!

    Plugin Author Chouby

    (@chouby)

    I foresee a possible conflict with Polylang if the “disable translations” is activated as the locale ‘en_US’ may override the locale set by Polylang. But I don’t understand how this function could generate an infinite loop with Polylang.

    Can anyone ask a Divi developer to contact us at https://polylang.pro/support/ ?

    Done,

    Now let’s just hope they come back to you.

    “En clair, il n’y a plus qu’a…”

    Plugin Author Chouby

    (@chouby)

    Thanks.

    Just wanted to say thanks to uthn for the solution.
    Spent ages fiddling around, changing memory limits and all the usual stuff, as well as tearing my hair out until I found this.

    Thank You!

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Polylang causes exhausted memory error’ is closed to new replies.