This thread is resolved. Here is a description of the problem and solution.
Problem: The client added an English (EN) language version to their website, with Lithuanian (LT) as the main language. When switching to the EN version, images in the halls pop-up were not displaying unless the WPML admin cookie was set to EN. The images are managed using the ACF gallery field. Solution: We recommended enabling the Language Cookie to support AJAX filtering in the WPML settings. This can be done by navigating to WPML->Languages and enabling the 'Language Cookie to Support AJAX Filtering' option. For more details, visit Enabling Language Cookie to Support AJAX Filtering. We also clarified that the 'wp-wpml_current_admin_language_' cookie is only relevant when logged in and does not affect site visitors. Instead, the 'wp-wpml_current_language' cookie should ensure images display correctly. We suggested checking if any custom code might be interfering with this cookie and comparing the theme with another site using the same theme to identify any discrepancies.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also advise checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please contact us through the WPML support forum.
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.
Background of the issue:
I added an EN language for the website (LT language is the main). When visitors switch to EN, there are no images in the halls pop-up. I found that the issue is related to cookies. Specifically, when the wpml admin cookie is set to EN, images are shown. If this cookie is different or doesn't exist, no images are shown. Images are added from the CMS side using the ACF gallery field. The issue can be seen at hidden link.
Symptoms:
Empty block in the halls pop-up when switching to EN language. Images are not displayed unless the wpml admin cookie is set to EN.
Questions:
Why are images not showing in the halls pop-up when using to EN language?
How can I ensure images are displayed correctly without relying on the wpml admin cookie?
I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)
**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.
NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.
please go to the cloudways environment I created which is a copy of your site and visit the EN version.
Is it working OK for you? From my side, it is working as expected.
hidden link
No changes were performed in comparison to your live site, could there possibly be something on the server side that is interfering with the pop up ? Is there any server side or drop in caching?
Please visit the test site again and test using the homepage in EN, the pop up works OK there with the rooms, but the conferences still experience the issue.
If I understand correctly based on what I am seeing this is a custom pop up that was developed by your team, correct?
Is it possible to involve your team or theme author to give us their feedback as they do know their code best.
Please do note that when it comes to custom work and custom themes support is limited per our policy.
yes, even in the staging page that was provided earlier in rooms it works as expected but the issue still exists in the conferences page as you noted above.
yes, it is a custom pop-up but rooms and conferences share the same code base and work in the same way.
also, there is a more strange thing, that we have another project built using the same theme, and everything works as expected. But on this project we shared with you we have an issue related to the wpml admin cookie as also noted above.
The wp-wpml_current_admin_language_ cookie is a cookie that displays only when logged in therefore this would not make any difference for the visitors of the site since they do not get this cookie.
The cookie that they do get is wp-wpml_current_language which correctly shows the images.
In your custom code is there any code that requires this cookie possibly?
Also, you mentioned that you have another site using this theme.
What are your results if you deactivated the current theme and replaced it with a copy of the one from the other site that is working as expected?
Also, please review the specific code between the 2 themes, are there any major changes?