Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Browser redirection not working as expected

Solution:
See this reply on the ticket for details: https://wpml.org/forums/topic/php-warning/page/2/#post-14288957

Relevant Documentation:

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

Last updated by Waqas Bin Hasan 1 year, 4 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 21, 2023 at 9:57 am #14262099

steveK-13

Ok, thank you!

August 22, 2023 at 6:10 am #14267713

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I tried to reproduce on my local and everything seems to work fine as expected.

However, I've created a Sandbox site at hidden link which is a fresh installation with WPML, String Translation, WooCommerce and WCML configured mostly identical to yours.

WooCommerce has no products and I think it is not what we are looking into.

Site has all 7 languages and a home page (hidden link) translated with sample text (using a WordPress standard theme).

WPML is set to "Redirect visitors based on browser language only if translations exist" just like yours.

I've tried here also but can't see the problem. Can you please check this site along with your team from different locations and see if you reproduce the problem? This way we 'll have at-least some comparison (i.e. PHP versions, theme, plugins and overall the environment). And I'll then be able to escalate the problem to our 2nd tier team.

Please take your time and let me know.

August 22, 2023 at 9:39 am #14269569

steveK-13

The Sandbox website still not working, same as linkido.com website. Example, Edge PC will redirect only 1st. time to browser language Estonia, when going to open again with Edge PC, then its English.
PC/mobile Chrome wont redirect at all.

It's been 18 days now when opening that thread. Please escalate that problem to your 2nd tier team. If there's any other solutions to fix that issue fast, then let me know right away, we may pay or whatever needed.

P.S. Does the Chrome incognito has to work with WPML or not?

August 22, 2023 at 1:21 pm #14271621

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates and my apologies, I am trying my best to test and communicate as faster as I can.

I've escalated the issue to our 2nd tier along the followings:

- Issue details.
- The package you provided.
- New package taken from sandbox site.
- Access details to your live site (please keep it open as you provided earlier).

I'll update you as soon as I hear back from the team.

Thanks again for your patience and cooperation.

August 23, 2023 at 7:17 am #14274965

steveK-13

Ok, thank you very much!

August 25, 2023 at 6:33 am #14288957

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

Team checked and replies with the following:

Please check the documentation https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/#no-redirection-when-refreshing-the-browser. It is expected behavior that you are seeing on sandbox and I hope the user is also complaining for the same.

Further, they noted:

This feature does not depend on the location of the IP it depends on the languages of the browser.

This works correctly if:

- This is the first visit to the site i.e. no cookies are created.

- The language stack of the browser matches the site language. Do not confuse with the interface language of the browser. See following resources:
--- hidden link
--- hidden link

That means if the preferred language stack has EN => FR => ES then the page won't redirect if you visit English page of site.

The language on top has higher priority than the bottom.

If you still think this is a problem, team requests the following in a screencast (screen recording):

- Showing the language setting of browser.
- Then testing in private/incognito window.

Please let me know.

August 28, 2023 at 8:12 am #14298027

steveK-13

Ohh, I see now. I was thinking that it will change the language based on the browser interface language.

Yes, it works by now, but for some reason changing the language takes about 25 seconds. It was ok all the time (about 2 seconds when changing the languages) and I havent updated anything. Please look the attachment file, there's seen that the WPML plugin causing the issue. I was reading many different WPML threads about that kind of problem, but still could not found the solutions. You have the WP access, maybe you can check whats the problem.

111.png
August 28, 2023 at 12:42 pm #14300935

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your understanding. Please feel free to close this ticket as resolved.

For the other issue, please follow this Errata https://wpml.org/errata/wordpress-6-3-performance-issues-with-string-translation-in-specific-scenarios/ and apply the workarounds.

If this doesn't help, update to latest beta (hotfixes) of WPML and String Translation.

We've just released hotfix (beta) versions of WPML and String Translation, mainly focused on performance issues vs WordPress 6.3.

Can you please install these versions and retry? You can either do this from Plugins -> Add New -> Commercial and switch to Beta channel and install or can directly download from your https://wpml.org/account/downloads/ account (see attached).

If this load/performance problem continues to appear, I recommend opening a separate ticket because as per forum policy we can only handle one issue per ticket. So you can get more to the point help, without mixing up several issues in one long ticket.

beta.jpg
August 28, 2023 at 3:00 pm #14301803

steveK-13

Yes, updating the WPML and String Translation plugin fixed the performance issue.

Thank you very much!