[Resolved] Can't translate URLs in custom Elementor widgets
This thread is resolved. Here is a description of the problem and solution.
Problem: The client's website uses automatic translation for translating pages from English to Spanish. Although text fields in custom Elementor widgets are translatable, URL fields are not, leading to issues where some internal links point to English pages or show a 404 error instead of linking to the corresponding translated Spanish pages. Solution: We recommended removing unnecessary XML configuration that was preventing headings from being translated. For the untranslatable URL fields in the Icon Box widgets, manual correction of links was necessary. We advised the client to ensure that the 'Complete Translation' button is clicked after making manual adjustments to confirm changes. This process needs to be done in a compatible browser like Chrome, as it was found to not work correctly in Safari. If you're experiencing similar issues, we recommend checking your XML configuration for any unnecessary elements that might be blocking translations and manually updating any incorrect links. Additionally, always confirm changes by clicking the 'Complete Translation' button in a supported browser.
Please note that this solution might be outdated or not applicable to your specific 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 issue persists, 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.
Background of the issue:
My website is in English, and I'm currently using automatic translation to translate only Pages to Spanish. I used the Multilingual Tools plugin to generate an XML config file for my custom Elementor widgets so they can be translated. The text fields in my widgets are available to translate (ex: Button label), but the URL fields are not (ex: Button link URL).
Symptoms:
After automatic translation, most internal links have been translated to point to the correct page in the secondary language. However, some internal links have not, and I can't manually correct this since the URL fields aren't available in the translation editor. The target pages have been translated to the secondary language.
Questions:
Is there a way to force the automatic translation to find the correct page in the secondary language and link to it?
Is there a way to manually correct the links?
I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
Sorry, it says "Error: The username WPML-kor is not registered on this site. If you are unsure of your username, try your email address instead." and could you please check?
I see the issue now. I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.
To guide you further, please adhere to these instructions:
1. View the Duplicator instructions video: hidden link
3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.
Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.
Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.
I failed to import the files that you shared. Can I have your permission to install the duplicator plugin on your Website so that I can download a copy of the website on my own?
I apologize for the delays. I haven’t yet found a solution for this issue, so I will escalate it to our 2nd Tier Support for further investigation. I’ll get back to you as soon as possible!
Hi, we'd like to run our monthly plugin update routine on our dev site. You already cloned the site with the old plugin versions. Can you please let me know what 2nd tier support recommends: can we update plugins, or should we wait until they're done troubleshooting? Thanks!
Thanks for your reply. You can update the plugins without issues and will not interrupt our troubleshooting process. We are still checking on this and will return to you once I've feedback.
Hello, thanks so much for the update. I was able to translate the links on the Impact & Results page.
Next I re-enabled plugins and attempted to update links on the Advocacy page. I could access the inline links in the ATE and update them (see screenshot advocacy-ate.png), but the changes didn't take effect on the frontend (see screenshot advocacy-frontend.png). I edited the page title + resaved, plus I cleared the server cache and tried an incognito window. The links were still not updated on the frontend. Next I tried disabling all plugins and repeated the cache clearing, incognito window, etc. The links were still not updated.
Additionally, the link for the button "Inscríbete" at the bottom of the page was not available for me to edit.
Then I went back to the Impact & Results page and noticed that all the headings are no longer translated on the frontend (see screenshot impact-results.png). The ATE shows translated strings.
It looks like you also tested link translation on the Ways to Give page, and I see that it too now has English headings on the Spanish page.
I still need assistance getting WPML to function properly. Thank you.
Steps I took (in both Chrome and Safari, using incognito windows):
1. Log into the website
2. View the page in English
3. Use the WPML language switcher to switch to Spanish
4. Click the edit translation button
6. Click the Complete Translation button
7. WPML returns me to the page, but it's still not translated correctly
Further, I've noticed that since you've changed the XML config, the headings are no longer showing up in the ATE to be edited. And on the page you mentioned, three of the custom Icon Box widgets have correctly translated links (and those links are available to edit in the ATE). One Icon Box (for the Spay-Neuter Clinic) isn't available for translation and its Spanish link points back to the English target page.
I removed the following code that you all had added to the XML config and now the headings are translating again. (We are not using custom Heading widgets so I assume this code isn't needed.)
`<widget name="heading">
<conditions>
<condition key="widgetType">heading</condition>
</conditions>
<fields>
<field type="Heading: Link URL" editor_type="LINK">link>url</field>
</fields>
</widget>`
HOWEVER, now the Icon Box buttons are labeled "Learn More" in Spanish rather than "Saber mas" like they used to be. Also, the one untranslatable Icon Box link is still an issue.
I also tried to update the (incorrect inline) links on the Advocacy page, and that appeared to work. So it feels like we've made a bit of progress. However, the Ways to Give page is even less translated than it was before!
Thanks for the assistance so far, hopefully we can resolve this soon.
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.