Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 0 replies, has 1 voice.

Last updated by Otto 1 week, 2 days ago.

Assisted by: Otto.

Author Posts
April 2, 2025 at 9:33 am #16886213

yaqoubA

Background of the issue:
I am trying to translate my website using WPML. When I go to WPML Translation Management, I encounter a critical error. The error message indicates that WordPress detected a fatal error with the WPML String Translation plugin. I am using WordPress version 6.7.2, the Aldlalz theme version 3.4.7, and PHP version 8.2.27. The error details mention an uncaught TypeError in the file /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/Setting/Repository/SettingsRepository.php at line 245.

Symptoms:
An error of type E_ERROR was caused in line 245 of the file /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/Setting/Repository/SettingsRepository.php. Error message: Uncaught TypeError: WPMLStringTranslationInfrastructureSettingRepositorySettingsRepository::getDefaultLanguageLocaleCode(): Return value must be of type string, null returned.

Questions:
How can I resolve the critical error with the WPML String Translation plugin?
What steps should I take to fix the TypeError in the SettingsRepository.php file?

April 2, 2025 at 9:34 am #16886237

yaqoubA

Howdy!

WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML String Translation.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.7.2
Active theme: Aldlalz (version 3.4.7)
Current plugin: WPML String Translation (version 3.3.2)
PHP version 8.2.27

Error Details
=============
An error of type E_ERROR was caused in line 245 of the file /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/Setting/Repository/SettingsRepository.php. Error message: Uncaught TypeError: WPML\StringTranslation\Infrastructure\Setting\Repository\SettingsRepository::getDefaultLanguageLocaleCode(): Return value must be of type string, null returned in /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/Setting/Repository/SettingsRepository.php:245
Stack trace:
#0 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringCore/Repository/TranslationsRepository.php(82): WPML\StringTranslation\Infrastructure\Setting\Repository\SettingsRepository->getDefaultLanguageLocaleCode()
#1 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringCore/Command/LoadExistingStringTranslationsCommand.php(42): WPML\StringTranslation\Infrastructure\StringCore\Repository\TranslationsRepository->createEntitiesForExistingTranslations()
#2 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringGettext/Command/ProcessPendingStringsCommand.php(135): WPML\StringTranslation\Infrastructure\StringCore\Command\LoadExistingStringTranslationsCommand->run()
#3 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Application/StringGettext/Service/GettextStringsService.php(179): WPML\StringTranslation\Infrastructure\StringGettext\Command\ProcessPendingStringsCommand->run()
#4 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Application/StringCore/Service/StringsService.php(23): WPML\StringTranslation\Application\StringGettext\Service\GettextStringsService->processSavedPendingStringsAndSettingsQueue()
#5 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/InitAction.php(66): WPML\StringTranslation\Application\StringCore\Service\StringsService->maybeProcessQueue()
#6 /home/u833106985/domains/aldlalz.com/public_html/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/AbstractActionHookHandler.php(14): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\InitAction->onAction()
#7 /home/u833106985/domains/aldlalz.com/public_html/wp-includes/class-wp-hook.php(322): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\AbstractActionHookHandler->WPML\StringTranslation\Infrastructure\WordPress\HookHandler\{closure}()
#8 /home/u833106985/domains/aldlalz.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#9 /home/u833106985/domains/aldlalz.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#10 /home/u833106985/domains/aldlalz.com/public_html/wp-settings.php(704): do_action()
#11 /home/u833106985/domains/aldlalz.com/public_html/wp-config.php(107): require_once('/home/u83310698...')
#12 /home/u833106985/domains/aldlalz.com/public_html/wp-load.php(50): require_once('/home/u83310698...')
#13 /home/u833106985/domains/aldlalz.com/public_html/wp-admin/admin.php(34): require_once('/home/u83310698...')
#14 {main}
thrown

April 2, 2025 at 12:44 pm #16887040

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I am sorry for the inconvenience.

To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/.

Our devs are taking a look, and it may be helpful to take a look at your site (if that's not a problem for you).

If it's ok, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.
It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.
This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields.

Best Regards,
Otto

April 14, 2025 at 12:56 pm #16929581

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

But the credentials are not working for me. Can you please double-check them?

Best Regards,
Otto

April 14, 2025 at 2:58 pm #16930202

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I took a copy of your site and shared it with our second-tier support.

I'll get back to you as soon as I have news from them.

Best Regards,
Otto

April 14, 2025 at 3:02 pm #16930206
yaqoubA

Otto I think somehow i managed to make it works, but menu and some content images not showing i don't know where the problem is can you assist? I uploaded some of the issue i am facing

New threads created by Otto and linked to this one are listed below:

https://wpml.org/forums/topic/menu-and-some-content-images-not-showing/

Screenshot 2025-04-14 174037.png
April 14, 2025 at 3:11 pm #16930230

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks. I am closing this ticket then.

I created a new ticket for the new issue:
https://wpml.org/forums/topic/menu-and-some-content-images-not-showing/

I'll follow up there.

Best Regards,
Otto