[Resolved] Use different image in English than in French
This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to display different images for different languages on your WordPress site using BeTheme's Be.Story box Elementor widget, but the same image appears in both languages. Solution: We resolved this issue by registering the necessary XML configuration in WPML. Here's how you can do it: 1. Navigate to WPML -> Settings -> Custom XML Configuration. 2. Add the following XML configuration:
3. Save the configuration. 4. Update your page translations, ensuring that the image URLs are correctly translated. For more detailed guidance, refer to the following documentation:
If this solution does not apply to your case, or if it seems outdated, we highly recommend 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. If issues persist, please open a new support ticket.
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.
If your media doesn’t update on the front-end, after the above mentioned, click Scan & Replace in the notice that appears after uploading your media in the Media Translation screen.
Hi, yes I've done that but it still not work.
I've tried again few days later but, doesn't work. I have tried to clear and deactivate cache as well, but it is not working.
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.
Thank you for providing the access, however, when trying to access it is asking for an email for some confirmation. While, entering an email leads to a page with "Something went wrong" message.
Please see attached.
I've enabled your next reply as private again, in case you want to provide updated access information.
Thank you for waiting. I was able to see the problem.
I've tried different options but I see the following error on translated page:
post-2157.css:1 GET <em><u>hidden link</u></em> net::ERR_HTTP2_PROTOCOL_ERROR 200 (OK)
If you load that image URL directly in browser, that's working fine, but somehow server is throwing a protocol error. So far I'm not sure why is that, but that looks like an apparent reason because translated image looks inaccessible.
Is it OK if I deactivate all other plugins and check with only WPML plugins?
I also just received this mail from WPML "Dear Marina,
We’ve just released WPML 4.7.6 – a patch version focused on Elementor-related fixes.
This update addresses:
A rare issue where translations could be overwritten by the original post when using a page builder
Issues with translating loop grid queries that use term_taxonomy_id instead of term_id
A fatal error caused by invalid JSON data
A fatal error when Elementor display conditions are stored in a non-standard format
How to update:
This update should be visible on your site's Plugins page within 24 hours.
If it’s not, or if you want to update immediately, go to your site's admin, navigate to Plugins → Add New, then click the Commercial tab. Click Check for updates, then select and start the update.
"
The image was coming through BeTheme's "Be.Story box" elementor widget. This widget is perhaps either new or has something changed. So it needed to be recognized by WPML, that's why I used the above mentioned XML. WPML offers a way of registering such elements, widgets or blocks, so then their content is available in translation editor for the translation.
I used the 2nd guide which offers a multilingual tools plugin and generates all the needed XML (as well as other relevant data). So I did the following:
- Uploaded via plugins and activated it.
- Created a new test page (hidden link) with default Elementor's Image widget and with Be.Story box widget.
- Saved and exited to WordPress.
- There in the WordPress editor, the above said multilingual tool offered a section where I found the above mentioned XML (see attached).
- I copied the XML (for the mfn_story_box only) to WPML -> Settings -> Custom XML Configuration.
- Saved.
- Resaved the test page.
- Updated the translation and in translation editor I could see the Image URL, which I updated with the translated one I wanted to use (see attached).
- And on frontend, it works fine now hidden link.
I've fixed one image at hidden link also, while you can fix other now by updating the translation manually and using the translated image URLs (see attached).