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.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5:00 – 13:00 5: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/Argentina/Buenos_Aires (GMT-03:00)

Tagged: 

This topic contains 2 replies, has 0 voices.

Last updated by Otto 1 hour, 53 minutes ago.

Assisted by: Otto.

Author Posts
April 23, 2025 at 9:56 pm #16962163

saraO-6

Background of the issue:
I am trying to ensure that button links to the webshop on my site hidden link direct users to the correct language-specific SHOP pages, such as /da/ or /fr/, instead of the original language.

As far as I can see, the link is not hardcoded.

Symptoms:
Button links to the webshop are linking to the original language (english) and not to the language-specific pages like /da/ or /fr/.

Questions:
Why are the button links to the webshop not directing to the language-specific pages?
How can I configure WPML to ensure the webshop links point to the correct language versions?

April 24, 2025 at 12:56 pm #16964470

Otto
WPML Supporter since 09/2015

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

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

Hello,

It's weird because the other two buttons work properly. Were all built in the same way? It looks like they are Elementor elements from Kadence, is that right?

Make sure you are using a relative path in the button URL.

Also, try this:
- Go to WPML > Settings > Translate Link Targets.
- Click on “Scan now and adjust links”. This will prompt WPML to search for internal links and adjust them to point to the correct language versions where translations exist.

If none of these work, can you please elaborate a bit on how the button was built?

Best Regards,
Otto

April 25, 2025 at 10:39 am #16967984

saraO-6

Dear Otto,

I have performed the scan before making any changes, but it didn't help. I changed the URL to /shop/ - and did another scan, but that also didn't help.

After both scans, 83 findings were reported. I am wondering if that is how it should be?

From the attached images, you can also see that the three buttons are the same type.

I am also wondering what the v parameter is caused by.
hidden link

Is that from wpml?

Screenshot 2025-04-25 at 12.31.25.png
Screenshot 2025-04-25 at 12.15.44.png
Screenshot 2025-04-25 at 12.09.25 - second scan after changing url.png
Screenshot 2025-04-25 at 10.21.31.png
Screenshot 2025-04-25 at 10.20.32.png
Screenshot 2025-04-25 at 10.16.05.png
April 25, 2025 at 2:19 pm #16968983

Otto
WPML Supporter since 09/2015

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

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

Hello,

No, I don't think WPML added the parameter.

I suggest you try this to help us identify if it might be a conflict with another plugin or theme that is causing the problem.
**IMPORTANT:** Please try this in a staging environment or at least with a backup of your site files and database before continuing.
Disable all plugins except WooCommerce and WPML-related, and temporarily change the theme to a default WordPress theme such as Twenty Twenty-five. Keep the theme if it's needed to reproduce the problem.
Is the issue resolved with these settings? If so, please reactivate one by one to see which conflicts.

Best Regards,
Otto

April 28, 2025 at 1:54 pm #16975259

saraO-6

AFter making a staging environment, will I then need to go through the WPML setup guide from scratch?

Screenshot 2025-04-28 at 15.53.26.png
April 28, 2025 at 1:57 pm #16975275

Otto
WPML Supporter since 09/2015

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

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

Hello,

The staging environment should be a copy of your current setup. So, no, it shouldn't be necessary to run the WPML setup again, as it should copy your site's current settings.

What you should take into account is this:
https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/using-advanced-translation-editor-when-you-move-or-use-a-copy-of-your-site/#using-a-copy-of-your-site

Best Regards,
Otto

April 28, 2025 at 2:21 pm #16975355

saraO-6

Never in my life have I been struggling so much with a plugin

I just got this 30 min ago and I am soon giving up

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.8
Active theme: Kadence Child (version 1.2.14.1738096120)
Current plugin: WPML String Translation (version 3.3.2)
PHP version 8.2.28

Error Details
=============
An error of type E_ERROR was caused in line 245 of the file /home/innerdevelopment/public_html/uuqpogmv/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/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/Setting/Repository/SettingsRepository.php:245
Stack trace:
#0 /home/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringCore/Repository/TranslationsRepository.php(82): WPML\StringTranslation\Infrastructure\Setting\Repository\SettingsRepository->getDefaultLanguageLocaleCode()
#1 /home/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringCore/Command/LoadExistingStringTranslationsCommand.php(42): WPML\StringTranslation\Infrastructure\StringCore\Repository\TranslationsRepository->createEntitiesForExistingTranslations()
#2 /home/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringCore/Command/LoadExistingStringTranslationsForAllStringsCommand.php(59): WPML\StringTranslation\Infrastructure\StringCore\Command\LoadExistingStringTranslationsCommand->run()
#3 /home/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/WordPress/UpgraderProcessCompleteAction.php(36): WPML\StringTranslation\Infrastructure\StringCore\Command\LoadExistingStringTranslationsForAllStringsCommand->run()
#4 /home/innerdevelopment/public_html/uuqpogmv/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/AbstractActionHookHandler.php(14): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\WordPress\UpgraderProcessCompleteAction->onAction()
#5 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/class-wp-hook.php(324): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\AbstractActionHookHandler->WPML\StringTranslation\Infrastructure\WordPress\HookHandler\{closure}()
#6 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#7 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/plugin.php(517): WP_Hook->do_action()
#8 /home/innerdevelopment/public_html/uuqpogmv/wp-admin/includes/class-language-pack-upgrader.php(280): do_action()
#9 /home/innerdevelopment/public_html/uuqpogmv/wp-admin/includes/class-language-pack-upgrader.php(104): Language_Pack_Upgrader->bulk_upgrade()
#10 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/class-wp-hook.php(326): Language_Pack_Upgrader::async_upgrade()
#11 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#12 /home/innerdevelopment/public_html/uuqpogmv/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /home/innerdevelopment/public_html/uuqpogmv/wp-admin/includes/class-plugin-upgrader.php(412): do_action()
#14 /home/innerdevelopment/public_html/uuqpogmv/wp-admin/update.php(51): Plugin_Upgrader->bulk_upgrade()
#15 {main}
thrown

April 28, 2025 at 2:50 pm #16975573

saraO-6

This is an AI response to the errors above

I can see exactly what's happening with your WordPress site. This is a clear issue with the WPML String Translation plugin (version 3.3.2).

The error occurs because a function called getDefaultLanguageLocaleCode() is supposed to return a string value, but it's returning null instead. This happens in the WPML plugin's code when updating other plugins on your site.

Recommendations:

Use the recovery mode link they provided to safely access your admin dashboard

Temporarily deactivate the WPML String Translation plugin

Complete your other plugin updates first

Check if there's an update available for WPML String Translation

Contact WPML support with this specific error message as it appears to be a bug in their code

This is likely happening because your multilingual setup might be missing a default language configuration that the WPML plugin expects to find.

What's next?

April 28, 2025 at 4:03 pm #16975728

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.

Are you getting this on the staging site or the production site?

If it's OK with you, I can log in to the production site and take a copy to do the tests in my local environment.

I enabled a private reply so you can share credentials safely. To replicate your site locally, I'll need to temporarily install a plugin called “Updraft Plus” 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 29, 2025 at 3:58 pm #16980195

Otto
WPML Supporter since 09/2015

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

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

Hi Chrilles,

The credentials are not working for me. Can you please check them?

Best Regards,
Otto

April 30, 2025 at 2:00 pm #16984304

Otto
WPML Supporter since 09/2015

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

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

Hello,

Thanks.

I made a copy of your site and managed to translate the shop button URL into French.

Please try the following:
- I noted that you removed the languages so you'll need to re-add at least one to test (let's try French)
- Then go to Pages and edit the home page. Make a small change like adding a space or a dot
- This will trigger the translation needs update status
- Edit the translation and in ATE, using the search box in the top right search for: "/shop"
- Edit the link translation so it points to the right language version

This worked for me locally. Can you please give it a try?

Best Regards,
Otto

April 30, 2025 at 3:16 pm #16984754

saraO-6

Thanks Otto,

I currently have a VAT issue that I am looking into. As soon as that is solved, I will get back to you. I hope this is okay.

Best,
Chrilles

April 30, 2025 at 3:28 pm #16984822

Otto
WPML Supporter since 09/2015

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

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

Hello,

Sure, take your time. The ticket will remain open for two weeks without activity.

Best Regards,
Otto