Background of the issue:
I am trying to resolve an issue with some translated content on our website. The page loads content through AJAX, but it isn't always showing data. We don't have any issue while logged in, and it seems to be resolved after accepting all cookies. We use Cookie Script and have the cookie 'wpml_current_language' set to necessary. The option 'Store a language cookie to support language filtering for AJAX' in WPML is also enabled. For testing, we also disabled all caching on the website. The issue can be seen on this page: hidden link
Symptoms:
The AJAX call is not showing translated content unless logged in or after accepting all cookies.
Questions:
Why is the AJAX call not showing translated content when not logged in?
Could the issue be related to cookie settings or caching?
Apparently based on your debug information, there are several things which may cause this issue, like WPML's minimum requirements, such as:
- WordPress version: Although the above mentioned link says WPML should work with minimum WP 4.7 but it does not necessarily mean that it works perfectly fine.
- MySQL version
- PHP memory limit
- WPML plugins versions
Given the above mentioned, I'll recommend updating all of these and check again. I'll also recommend checking with only WPML plugins after fixing the above mentioned, to confirm if issue is really coming from WPML.
IMPORTANT: Please take full backup of your website and database beforehand.
It is highly advised to try this on a staging/dev site first, so your live website isn't compromised.
Please let me know and I'll try my best to help you further on the matter.
Regards.
The topic ‘[Closed] AJAX call not showing translated content’ is closed to new replies.