Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 3 replies, has 0 voices.

Last updated by Bobby 19 hours, 47 minutes ago.

Assisted by: Bobby.

Author Posts
August 28, 2025 at 8:36 pm #17356356

Christian

Background of the issue:
I am trying to access the WPML Translation Dashboard or the Settings through the left navigation bar of the admin area. This issue started occurring after updating WPML from version 4.2.x to 4.8.0. The old version did not have this problem, but the current version does. Link to a page where the issue can be seen: hidden link

Symptoms:
I encountered a PHP Fatal error: Uncaught TypeError: WPML\Legacy\Port\Plugin::getLanguageHomeUrl(): Return value must be of type string, null returned. This error is logged in the Apache error log.

Questions:
Why am I getting a PHP Fatal error after updating WPML?
How can I resolve the TypeError related to WPML\Legacy\Port\Plugin::getLanguageHomeUrl()?

August 29, 2025 at 12:03 am #17356449

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

If possible, please share your error log with me so I can get a better understanding of what might be causing this behavior.

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'hidden link');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

August 29, 2025 at 7:17 am #17356886

Christian

Hi Bobby,

the content of the log is included below.

I notice that there is a message about another plugin, BulletproofSecurity. Diabling this plugin does not resolve the TypeError.

Best regards
Christian

[29-Aug-2025 07:07:06 UTC] PHP Notice:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the [php]bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:07:07 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:07 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:07 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:07 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:40 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:07:45 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:07:45 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:45 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:45 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in blog/wp-includes/formatting.php on line 2829
[29-Aug-2025 07:07:46 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:07:47 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:07:50 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:08:03 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

bulletproof-security

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in blog/wp-includes/functions.php on line 6121
[29-Aug-2025 07:08:03 UTC] PHP Fatal error: Uncaught TypeError: WPML\Legacy\Port\Plugin::getLanguageHomeUrl(): Return value must be of type string, null returned in blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Port/Plugin.php:61
Stack trace:
#0 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Core/Component/Preferences/Application/LanguagePreferencesLoader.php(40): WPML\Legacy\Port\Plugin->getLanguageHomeUrl()
#1 [internal function]: WPML\UserInterface\Web\Core\Component\Preferences\Application\LanguagePreferencesLoader->WPML\UserInterface\Web\Core\Component\Preferences\Application\{closure}()
#2 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Core/Component/Preferences/Application/LanguagePreferencesLoader.php(33): array_reduce()
#3 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Core/Component/Preferences/Application/LanguagePreferencesLoader.php(80): WPML\UserInterface\Web\Core\Component\Preferences\Application\LanguagePreferencesLoader->getLanguages()
#4 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Core/Component/Preferences/Application/AutomaticTranslationsSectionController.php(56): WPML\UserInterface\Web\Core\Component\Preferences\Application\LanguagePreferencesLoader->get()
#5 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/CompositionRoot/Config/Config.php(353): WPML\UserInterface\Web\Core\Component\Preferences\Application\AutomaticTranslationsSectionController->initialScriptData()
#6 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/CompositionRoot/Config/Config.php(223): WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\Config->loadScripts()
#7 blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/WordPress/CompositionRoot/Config/AdminPage.php(29): WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\Config->onLoadPage()
#8 blog/wp-includes/class-wp-hook.php(324): WPML\UserInterface\Web\Infrastructure\WordPress\CompositionRoot\Config\AdminPage->WPML\UserInterface\Web\Infrastructure\WordPress\CompositionRoot\Config\{closure}()
#9 blog/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#10 blog/wp-includes/plugin.php(517): WP_Hook->do_action()
#11 blog/wp-admin/admin.php(238): do_action()
#12 {main}
thrown in blog/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Port/Plugin.php on line 61
[/php]

September 2, 2025 at 5:19 pm #17367304

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby