 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Great! I'm happy to hear that you solved the problem with the flags.
Regarding the clicks, it seems I failed to click the currency switcher the first time. I'm visiting the site right now, and it works correctly. If you see any problem when clicking on the currency switcher, and it disappears if you deactivate LiteSpeed, then the problem lies in the LiteSpeed configuration.
|
 rhettY
|
Just tried twice again. It can't switch back to USD at the first click, need to click second time to take effect. In fact, I can live with that for now.
These 2 in ticket: https://wpml.org/forums/topic/php-fatal-error-uncaught-invalidargumentexception-4/ seem to be more annoying
1. sitekey not found, though I've unregistered and re-registered several time.
2. PHP Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string.
|
 rhettY
|
Please check the video: hidden link
I need to click twice to return to default USD. Switching between other currency is not an issue.
ChatGPT said LS cache has in-built mechanism that would not cache files like admin-ajax.php.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Thank you for sharing the video.
If LS indeed does not cache files like admin-ajax.php, then you must contact them and ask them for a workaround on how to exclude this file from cache.
|
 rhettY
|
I found this arcitle: hidden link
and have disabled it.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Good morning!
This article explain how the LS cache options work. If you have any questions about these settings you must contact their support service. This is the WPML support service and the configuration of LS Cache falls outside of our scope.
Thank you very much for your understanding!
|
 rhettY
|
I am a bit confused. So you have found the issue is caused by litespeed caching admin-ajax.php, right? Or just wanna confirm it's not been cached?
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi,
We have found that the issue is caused by the configuration of the LS Cache plugin, because disabling it solves the problem. Our 2nd-tier specialists recommended excluding the admin-ajax.php file from cache.
If the LS Cache plugin indeed excludes the admin-ajax.php file (this is something you need to ask them), then you must contact them to get the correct configuration for their plugin so the currency switcher can work as expected.
|
 rhettY
|
Ok. I will consult them and get back to you
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Excellent! I will be waiting for your message.
|
 rhettY
|
Please check this post thread: https://wordpress.org/support/topic/admin-ajax-php-cache-2/#post-18656230
I've turned off rest api cache
|
 rhettY
|
Hi after turning off rest api cache, the issue still happens.
I compared the /wp-json load before and after turning off the rest api cache. Now it's "no-cache" in response header.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi there,
Thank you for your message
The Rest API has no impact on the language switcher. The site/WPML is not fetching any info from an external server via the Rest API when switching currencies.
|
 Carlos Rojas
WPML Supporter since 03/2017
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/Madrid (GMT+02:00)
|
I'd recommend explaining to them that if LS Cache is deactivated, the currency switcher works correctly, so there must be another configuration causing this behavior.
|