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 16 replies, has 2 voices.

Last updated by benjaminE-20 1 year, 8 months ago.

Assisted by: Bigul.

Author Posts
June 5, 2023 at 2:20 pm

benjaminE-20

Im having issues with the language switcher in the menu. When I switch from Danish (my native language) to English it works, but when I try switching back to Danish it just reloads the English version. I am using 2 domains for my site.

June 5, 2023 at 2:52 pm
June 5, 2023 at 4:30 pm #13773523

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

This bug looks like a compatibility issue. So a couple of requests for tracking the issue.

a) Please upgrade to the latest version of plugins after a full site backup{mandatory}. We would like to make sure the issue is existing with the latest versions of the plugins or not.

b) If the problem exists, please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the bug without affecting your live site.

--
Thanks!

Bigul

June 6, 2023 at 7:46 am #13775637

benjaminE-20

Hello,

I have updated all the plugins to the latest version, but the issue still seems to exist.
Go ahead and install the duplicator plugin and make a copy of the site for troubleshooting.

Thanks.

June 6, 2023 at 3:24 pm #13780111

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. But the file permission is missing for creating the Duplicator package. Please check it and refer to the attached image for more details.

--
Thanks!

Bigul

2023-06-06_20-52-06.png
June 7, 2023 at 8:06 am #13782819

benjaminE-20

I have been in contact with Flywheel support about this, who says they cannot give these file permissions. Instead I have setup a staging site for troubleshooting.

Url: hidden link

You should be able to login with the same credentials I provided before.

June 7, 2023 at 4:09 pm #13788141

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the staging site details. I will test it further and get back to you soon. Please wait.

--
Thanks!

Bigul

June 8, 2023 at 8:33 am #13791137

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Please check the attached image. On the staging site, the language switcher is working as expected when I switch to the *Different languages in directories* option of WPML>>Languages>>Language URL format.

So one request, please check with your hosting team that both domains have the same DNS settings. Refer to the following article for more details.

https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

--
Thanks!

Bigul

2023-06-08_13-54-59.png
June 8, 2023 at 10:07 am #13791945

benjaminE-20

I have been in contact with my hosting team who said the following:

"Unfortunately as we don't provide DNS services here at Flywheel, it can be tricky for us to help diagnose those kinds of issues but, I'd be happy to help where I can!

I've ran a quick check on both the EU and DK domains, here's the results:

hidden link
hidden link

For what it's worth, these look to be configured the same.

Testing the live site, switching to hidden link works perfectly.

However, it looks like upon inspecting what is supposed to be hidden link, that reads as hidden link

I suspect there may be a configuration issue here as the hyperlink to switch back to .dk is incorrect.

I can't seem to find where to locate the issue, sorry to say. It may be worth reaching back out to WMPL's support team with what we've found though!

They may be able to assist you from there in updating that URL."

June 8, 2023 at 11:40 am #13792767

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the feedback. I made a copy of the site using the All in One Migration plugin. Because there are limitations to testing multiple domain settings in the Staging site. We will debug it further and get back to you soon. Please wait.

--
Thanks!

Bigul

June 11, 2023 at 6:50 am #13804299

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

We had few rounds of testing locally. But not able to reproduce the issue on our local servers. It works as expected without any changes. Please check the following screencast for more details(I made a copy of the site without media files).

hidden link

So consulting with our dev team for an expert opinion now. We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

June 12, 2023 at 3:37 pm #13811137

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

We would like to cross check a few files of the site root folder to track this. So please share the FTP credentials to access the live site after a full site backup{mandatory}

--
Thanks!

Bigul

June 13, 2023 at 7:30 am #13813999

benjaminE-20

As I am not able to provide those credentials without you signing up as a colaborator on my hosting provider. I have downloaded the File Manager plugin for you to be able to acess and edit the files. hidden link

June 13, 2023 at 9:02 am #13814937

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. I have shared the details with our team and waiting for the feedback now. We will get back to you soon.

--
Thanks!

Bigul

June 13, 2023 at 11:14 am #13816143

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

The wp-config.php file of the live site's root folder has the following code(at line 27). May this code will make conflicts while having multiple domains.

/****************************************************************************/
/*                           Domain Configuration                           */
/****************************************************************************/

if ( !(defined('WP_CLI') && WP_CLI) ) {
    define('WP_SITEURL', FLYWHEEL_DEFAULT_PROTOCOL . $_SERVER['HTTP_HOST']);
    define('WP_HOME',    FLYWHEEL_DEFAULT_PROTOCOL . $_SERVER['HTTP_HOST']);
}

Therefore please change this code to the static URL(hidden link) after a full site backup{mandatory} & clear all types of caches. Then resave the permalinks(from Settings>>Permalinks) and make sure the bug is existing or not. Refer to the following article to know more about updating the WordPress home and siteurl Options.

hidden link

--
Thanks!

Bigul