• Resolved Drake

    (@marcoragogna)


    Hello, just discovered a big problem after accidentally upgrading to WordPress 6.5 and after debugging I found that the combination to generate it.

    It can be easily reproduce by install a fresh version of

    • WordPress 6.5
    • Latest version of Divi
    • Latest version of Modula

    No other plugins installed.

    The error is the following:

    Fatal error: Uncaught TypeError: Argument 2 passed to WP_Translation_Controller::load_file() must be of the type string, null given, called in C:\laragon\www\wordpress\wp-includes\l10n.php on line 838 and defined in C:\laragon\www\wordpress\wp-includes\l10n\class-wp-translation-controller.php:101 Stack trace: #0 C:\laragon\www\wordpress\wp-includes\l10n.php(838): WP_Translation_Controller->load_file(‘C:\laragon\www\…’, NULL, ‘en_US’) #1 C:\laragon\www\wordpress\wp-includes\l10n.php(1005): load_textdomain(NULL, ‘C:\laragon\www\…’, ‘en_US’) #2 C:\laragon\www\wordpress\wp-content\themes\Divi\includes\builder\api\DiviExtension.php(266): load_plugin_textdomain(NULL, false, ‘includes/langua…’) #3 C:\laragon\www\wordpress\wp-content\themes\Divi\includes\builder\api\DiviExtension.php(126): DiviExtension->_initialize() #4 C:\laragon\www\wordpress\wp-content\plugins\modula-best-grid-gallery\includes\divi-extension\includes\DiviExtension.php(16): DiviExtension->__construct(‘modula-divi’, Array) #5 C:\laragon\www\wordpres in C:\laragon\www\wordpress\wp-includes\l10n\class-wp-translation-controller.php on line 101

    I am trying to do some further debug, but please take a look too

Viewing 15 replies - 1 through 15 (of 28 total)
  • Thread Starter Drake

    (@marcoragogna)

    Yes don’t tell me. Lucky that I was awake at 2am and I got an alert otherwise tomorrow morning would be hell 🙂

    I debugged the issue and found a fix that I’ll share temporarily here.

    In the DiviExtension class it is missing the initialization of $gettext_domain property and that creates a chain that lead to Fatal Error.

    I modified the file “\modula-best-grid-gallery\includes\divi-extension\includes\DiviExtension.php” and defined the property in this way

    public $gettext_domain = ‘modula-best-grid-gallery’;

    immediately after

    class MODULA_DiviExtension extends DiviExtension {

    and it works.

    Not sure if that the best way, but is a good way to fix it. And this behavior was probably related to a localization speed improvement added in WP 6.5 (“I18N Improvements in 6.5 (Performant Translations)

    • This reply was modified 3 months ago by Drake. Reason: added more info
    ecogmedia

    (@ecogmedia)

    I’m getting a different error but gallery is crashing with WP 6.5 and current Divi.

    ecogmedia

    (@ecogmedia)

    Errors I’m getting, all plugins disabled and just running Divi and Modula crashes the site.

    [10-Feb-2023 18:47:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library ‘memcached.so’ (tried: /usr/lib/php/20220829/memcached.so (/usr/lib/php/20220829/memcached.so: undefined symbol: igbinary_serialize), /usr/lib/php/20220829/memcached.so.so (/usr/lib/php/20220829/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

    [10-Feb-2023 18:47:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library ‘redis.so’ (tried: /usr/lib/php/20220829/redis.so (/usr/lib/php/20220829/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20220829/redis.so.so (/usr/lib/php/20220829/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

    ullalaaron

    (@ullalaaron)

    Hi guys,

    I’m new to wordpress and I think I have the same errors but I don’t have the modula plugin.

    This is my stack trace:

    Fatal error: Uncaught Error: Class “WP_Translation_Controller” not found in /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php:796 Stack trace: #0 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php(1005): load_textdomain() #1 /home/mhd-01/www.mydomain.it/htdocs/wp-content/plugins/perfmatters/perfmatters.php(37): load_plugin_textdomain() #2 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/class-wp-hook.php(324): perfmatters_plugins_loaded() #3 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #4 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #5 /home/mhd-01/www.mydomain.it/htdocs/wp-settings.php(506): do_action() #6 /home/mhd-01/www.mydomain.it/htdocs/wp-config.php(103): require_once(‘…’) #7 /home/mhd-01/www.mydomain.it/htdocs/wp-load.php(50): require_once(‘…’) #8 /home/mhd-01/www.mydomain.it/htdocs/wp-admin/admin.php(34): require_once(‘…’) #9 /home/mhd-01/www.mydomain.it/htdocs/wp-admin/index.php(10): require_once(‘…’) #10 {main} thrown in /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php on line 796

    Fatal error: Uncaught Error: Class “WP_Translation_Controller” not found in /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php:796 Stack trace: #0 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php(953): load_textdomain() #1 /home/mhd-01/www.mydomain.it/htdocs/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain() #2 [internal function]: WP_Fatal_Error_Handler->handle() #3 {main} thrown in /home/mhd-01/www.mydomain.it/htdocs/wp-includes/l10n.php on line 796

    I can’t even access the wp-admin section and I didn’t upgrade WordPress but I suspect the auto-upgrade flag was on.

    I see some new file being added last night such as a .maintenance

    What would be the best way to rollback?

    gabriserra

    (@gabriserra)

    Thanks, @drake, I had the very same issue. The DiviExtension class, when calling the initializer provides the gettext_domain attribute, which in this case is null. Tbh, a lot of divi extensions are realized like this, especially when they do not provide translations.

    I am quite sure something changed in the 6.5 API of load_plugin_textdomain.

    @ecogmedia your error does not depend on the plugin nor Divi. Your PHP setup is broken. Make sure memcached and redis are installed. If you are using a managed hosting, ask to their support.

    Thread Starter Drake

    (@marcoragogna)

    @ullalaaron not sure about your issue, but the best way for you to fix it is to rollback to a yesterday backup and disable the autoupdate until you find the cause of your issue

    Plugin Author Razvan Aldea

    (@raldea89)

    Hey guys,

    We are preparing an update for the Divi extension problem, so that should be fixed. Regarding the problems for @ullalaaron and @ecogmedia, as said by @marcoragogna and @gabriserra, they do not seem related to Modula, so not quite sure what is happening there.

    Warmly,
    Razvan

    gabriserra

    (@gabriserra)

    Hi @ullaron, your issue seems linked to a failed WordPress core update.

    The .maintenance file is created when updating, to stop website functionality during updates. When the update is finished, the file is removed. Given that in version 6.5, a new translation mechanism was added, most probably your current installation is partially updated to the new version.

    If you have the possibility, roll back to a previous backup. If you haven’t, reinstall the WordPress core back to the version you had in past (you can find the version in wp-includes/version.php

    Anyway this is not the right place, you can try to move this discussion on WordPress Github issues.

    ullalaaron

    (@ullalaaron)

    @marcoragogna thank you, that’s what I thought. Sadly I had just imported the site from a different hosting and I didn’t enable backups. Not sure what to do. Is there a manual way to downgrade WordPress?

    Thank you so much for your response.

    marcpaul

    (@marcpaul)

    My miserable workaround was on the root of the error:

    “: Uncaught TypeError: Argument 2 passed to WP_Translation_Controller::load_file() must be of the type string, null given”

    If you have this, it means that the parameter passed is null instead of a string, something that wordpress can’t catch at all.

    I restored my installation by changing this line in file “wp-content\themes\Divi\includes\builder\api\DiviExtension.php” at line 266

    load_plugin_textdomain( $this->gettext_domain, false, basename( $this->plugin_dir ) . '/languages' );
    load_plugin_textdomain( $this->gettext_domain ?? "et_pb_wpt_gravityform", false, basename( $this->plugin_dir ) . '/languages' );

    It doesn’t even mather if “et_pb_wpt_gravityform” (the right value for me) is in there, as long as there is anything that is a string for the error to be caught and ignored by wordpress. In other words, this workaround allows you to get access to your installation and update everything.

    • This reply was modified 3 months ago by marcpaul.
    ullalaaron

    (@ullalaaron)

    @gabriserra thank you so much for your response. I saw that the previous version I had was 6.4.3

    Just to make sure I don’t mess things up any further, I’ll delete everything on my existing installation except the wp-content folder and the wp-settings.php file and upload the wp 6.4.3 files..correct?

    Thank you for your help, you’re a life saver

    Hi @raldea89

    Do you have a time estimate for the updated plug-in? I do not want to roll back to previous WordPress version.

    Plugin Author Razvan Aldea

    (@raldea89)

    Hey @torgjoha,

    In a few moments we’ll release the update.

    Warmly,
    Razvan

    Plugin Author Razvan Aldea

    (@raldea89)

    Hey guys,

    The new version should be up and running. Please let me know if the problem still persists.

    Warmly,
    Razvan

    Thread Starter Drake

    (@marcoragogna)

    Hi @razan, tested and it works.

    Thank you for your prompt action.

Viewing 15 replies - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.