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 next available supporter will start replying to tickets in about 3.37 hours from now. Thank you for your understanding.

This topic contains 11 replies, has 3 voices.

Last updated by chadW-5 1 year, 4 months ago.

Assigned support staff: Yvette.

Author Posts
May 22, 2018 at 8:42 pm #2211696

chadW-5

I am trying to: switch back and forth between 2 languages.

Link to a page where the issue can be seen: hidden link

I expected to see: Clicking "US" would go back to hidden link

Instead, I got: "US" in main nav and footer just point to same site (hidden link). When on US URL (hidden link), switcher correctly points to UK URL (hidden link).

Also, since activating WPML, Chrome shows a spinning/loading icon in the tab for several seconds. This site used to load almost instantly. This happens whether we use "Different languages in directories" or "A different domain per language."

May 23, 2018 at 6:39 pm #2217772

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

This is not typical behavior, so let's try a few things. First, if you temporarily switch to languages in directories or languages added as parameters, do you see the same behavior?

Next, I'd like to have you try a few things so we can try to isolate the issue. This is just to help me identify if it might be a conflict with another plugin or theme that is causing the problem.

** IMPORTANT ** Please backup a working copy of site files and database before continuing.

Update all WPML plugins & WordPress core.

Disable all plugins except WPML related and then temporarily change the theme to a default WordPress such as TwentyFifteen. With these settings, does the language switcher work correctly?

May 24, 2018 at 1:47 pm #2223259

chadW-5

When I choose Different languages in directories or Language name added as a parameter, the switcher works fine. It's only a problem with A different domain per language.

All WPML plugins & WordPress core are updated.

I disabled all plugins except WPML related and then temporarily changed the theme to TwentyFifteen. The problem persisted when the site was set to A different domain per language.

The problem with Chrome showing a spinning/loading icon in the tab for several seconds is no longer occurring. I don't know why.

P.S., I recognize your name from speaking at WordCamp Greenville SC 2018. I was a co-organizer and also a speaker.

May 24, 2018 at 2:58 pm #2223738

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hey Chad, good to hear from a fellow WC Greenville Speaker 🙂 Since it's only happening with different domains per language, can you please confirm that the domains are setup according to this documentation? https://wpml.org/2016/04/use-wpml-different-domains-per-language/

Let me know if everything is set up this way, and if so, I'll continue troubleshooting.

May 24, 2018 at 4:18 pm #2224507

chadW-5

Yes, DNS is pointed as described in that documentation, and Nginx aliases were handled by Flywheel (managed WP host). It's interesting that we can switch from US to UK, but not back from UK to US.

Other than creating a custom switcher, is there a way to force the link/URL associated with a language in the switcher? Maybe that would be a workaround if the default functionality isn't working. Just a thought.

May 24, 2018 at 6:45 pm #2224993

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Do you happen to have a staging site set up with Flywheel, so I can test some different settings?

I notice when I click on the UK flag after coming from the US version of the site, the domain shows as hidden link instead of just hidden link. Did you select the option to pass session arguments when changing languages? If you disable that option, clear the WPML cache and save permalinks, does the language switcher work correctly?

Here is some additional information https://wpml.org/documentation/getting-started-guide/language-setup/passing-session-data-between-languages-in-domains/

Lastly, to best troubleshoot the issue, please make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. This will allow me to try and duplicate the error so that I can run further tests without interrupting your live site.

Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

I will also need the username and password of an account that was created BEFORE creating the duplicator package.

I will enable the next reply to be private so only you and I have access to it!

May 25, 2018 at 6:39 pm #2231480

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for sending access. I downloaded the Duplicator files and was able to make a copy of your site but I was unable to test because when I try to save the URLs in WOML -> Languages, the site crashes on me. Is it possible for me to test on your live site? I would need the ability to deactivate themes/plugins. If so, please confirm you have a full backup before I proceed.

Also, in wp-config.xml, the homepage is defined. If you comment out those lines, do you see any change in the language switcher behavior? Specifically I am referring to these lines:
define('WP_SITEURL', 'yourdomain.com');
define('WP_HOME', 'yourdomain.com');

May 25, 2018 at 7:12 pm #2231569

chadW-5

I don't know what the wp-config.xml is. Do you mean wp-config.php? Flywheel automatically generates that file and doesn't allow it to be edited. But, if you'd like, I can ask them if they can comment out those lines. We can try this before you troubleshoot the live site, if you'd like.

I just made another backup. Yes, you may use the account I gave yesterday to work on the live site.

May 28, 2018 at 3:13 pm #2239776

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Hello

Lauren is not available today and so I will be handling your ticket going forward.

I´ve read through the message thread and I agree that it would be a good "next step" to ask your hosting provider to comment out those lines and then get back to us on the result.

Thanks for that.

May 28, 2018 at 7:25 pm #2241450

chadW-5

I have contacted Flywheel (web host) support. I don't expect to hear back from them today (Memorial Day in US), but will let you know when I do.

May 29, 2018 at 5:51 am #2242877

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Sure - thanks.

May 31, 2018 at 10:21 am #2255443

chadW-5

Flywheel (web host) fixed the problem by changing their setting "Primary Domain Redirecting."