This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue with WPML Media Translation where the 'Save media translation' button remains inactive, and despite adding Name, Caption, and Alt text to a different file, the translated image does not appear, but the English image does. Solution: We recommend using the
function to ensure that the media ID is correctly translated, which should resolve the issue with the inactive button and the incorrect display of images. Here is a step-by-step guide: 1. Retrieve the original media ID and URL. 2. Use the
apply_filters
function to get the translated media ID. 3. If the original media ID does not match the translated media ID, update the media URL and ID to the translated ones. 4. Verify that the translated media appears correctly in place of the English image.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, 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 the problem persists, please open a new support ticket at WPML support forum for further assistance.
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 am trying to translate media using WPML Media Translation. I attempted to upload another media via 'Use a different file', adding Name, Caption, and Alt text. The issue can be seen on this page: hidden link.
Symptoms:
The 'Save media translation' button remains inactive and cannot be pressed. There is a warning: 'Any changes you make to the text here will not affect any previous publications of this media on your website. This edited version will only appear if you select it from the library to be embedded.' Instead of seeing a translated image, I got an English image.
Questions:
Why is the 'Save media translation' button not active?
How can I ensure the translated image appears instead of the English image?
Screen from DEV, but exactly like in PROD
Scenario:
1) Edited source page (en) and uploaded new image
2) Via page list* in en found source page and edited FR-FR translation in WPML, saw image meta and filled it out.
3) Via WPML media translation edited FR-FR translation and uploaded new image. BUT was not able to save due to inactive button
Please read whole conversation before answering and kindly advice with EXACT steps you want me to test. I learn that WPML in some cases can behavior differently* depending on how you call it, so we need to be very precise.
Long story short:
ME: I attempted to upload another media via 'Use a different file', adding Name, Caption, and Alt text. The 'Save media translation' button remains inactive and cannot be pressed.
Christopher Amirian: Would you please test if the same thing happens if you do not touch the meta information of the image?
ME: same
Andreas W.: You will need to edit the meta information and then the bottom should become available.
Thank you.
* for example structural changes will be pushed to translations ONLY if you edit translation from page list, but they remains intact if you edit source page and than open translation from here. IMHO its bug. Also when you duplicate translation from here - link will be broken, you have to use duplicate feature in Translation management to keep link. IMHO its bug #2. Also when you have translation duplication, in source page (en) translation duplicate of fr-fr, fr-be looks like translation of en, instead of fr-fr, while on fr-fr its displays correctly. IMHO its bug #3.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
On WPML > Media Translation, when translating the media, after uploading an alternative media file make sure to edit some of the text fields, like the title, alt text, or caption, and then the button will become available.
The button will not be activated until a text box is edited.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further.
The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up the site and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.
I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further.
However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose.
If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/.
If you are not able to provide such a copy of the website for testing, please let me know on this ticket.
The private reply form looks like this: hidden link
The next time you reply, click on "I still need assistance".
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.
Hi Andreas,
I was able to figure out Media translation - appears one of plugins we are using - "Easy Media Replace" is the reason. Any idea of compatible alternatives ? Any fixes?
Easy Media Replace allows you to replace images and media files easily while retaining the attachment URL and ID. No more delete, re-upload, and search-replace. IE. Instead of deleting old image or upload new - we simply replace file.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
It might be that you will need to sync the media again in WPML Media Translation if a original image is being replaced. The problem might be, that this media sync dialog will only show up after you upload alternative media on Media Translation.
Does reuploading the media to WPML Media Translation not solve the issue?
---
I can offer a WPML test site to try to recreate the issue and we can take further steps from there.
Andreas, sorry, problem remains with Media Translation - case where we use Custom Block. I've translated media, but when use it with my custom page block "convera/card-block", which have mediaURL and mediaID param, remains untranslated, unless in source page (EN) I insert separate image and choose same image like in block, than edited translation in FR-FR - both images get translated, but when I remove image - my image in custom block again not translated.
============
<!-- wp:convera/card-block {"title":"Governance: our approach to creating best-in-class governance of the ESG program","text":"","mediaID":4736,"mediaURL":"hidden link","cardType":"title-text-image","mediaStyle":"none","mediaPosition":"right"} -->
<!-- wp:paragraph -->
<p>Ongoing governance of the program will be managed under Convera’s Risk and Compliance organization, reporting upwards to the Convera Board.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>There are many other programs already established in such areas as Ethics, Compliance and Risk, Cyber Security, and Legal which are integral to a successful ESG strategy.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Convera will review each program to ensure they all encompass the principles and values of our ESG strategy, and correct alignment around governance and reporting.</p>
<!-- /wp:paragraph -->
<!-- /wp:convera/card-block -->
<!-- /wp:areoi/column -->
<!-- /wp:areoi/row -->
<!-- /wp:areoi/container --></div></div>
<!-- /wp:cover -->
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
If you open the translation for a page that contains this block and the media URL does appear on the WPML Translation Editor, then you will need to translate the media source URL manually.
Can you please confirm if this is the cause of the issue?
<!-- wp:convera/card-block {"title":"Working together for the future","headingLevel":"h2","text":"","link":"hidden link","linkTitle":"","linkTarget":"_blank","mediaID":103670,"mediaURL":"hidden link","cardType":"title-text-image","mediaStyle":"none","mediaPosition":"right","mediaAlignment":"justify-content-right"} -->...
everything works as expected. once regular image deleted - block translation stop working.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.