Ce sujet est résolu. Voici une description du problème et de la solution.
Problem:
The client is trying to translate FluentForm IDs using WPML with different IDs for French and English versions, managed through Divi builder. The client faced issues where the FluentForm ID was not appearing in the 'Edit translation' section and was incorrectly modified in the source language upon updates.
Solution:
1. Add the following XML configuration to WPML > Settings > Custom XML Configuration:
<wpml-config> <shortcodes> <shortcode> <tag>fluentform</tag> <attributes> <attribute>id</attribute> </attributes> </shortcode> </shortcodes> </wpml-config>
2. Insert this code at the top of your theme's functions.php file to make the form ID translatable:
add_filter('wpml_tm_job_field_is_translatable', '__return_true');
3. Make a minor edit to the page where the shortcode is used to refresh WPML elements.
4. Search for the form ID using the search bar in the translation editor.
If this solution does not resolve your issue or seems outdated, we 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.
Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.
Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.
Marqué : ATE
Ce sujet contient 0 réponse, a 0 voix.
Dernière mise à jour par victorM-56 Il y a 2 semaines et 4 jours.
Assisté par: Ilyes.
Auteur | Articles |
---|---|
mars 14, 2025 at 4:49 pm #16818033 | |
victorM-56 |
Background of the issue: Symptoms: Questions: |
mars 15, 2025 at 10:41 am #16819657 | |
victorM-56 |
EDIT : I temporary modify french page and put english form (instead of french) to have english form on english and german pages too. Because this porblem has a big impact (to have french form on english and german page). Thanks for your help, |
mars 17, 2025 at 3:05 pm #16825965 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, Thank you for contacting WPML support team, We actually had this issue reported before here : https://wpml.org/forums/topic/fluentform/ You can try the solution suggested by my colleague : Add this to WPML > Settings > Custom XML Configuration <wpml-config> <shortcodes> <shortcode> <tag>fluentform</tag> <attributes> <attribute>ID</attribute> </attributes> </shortcode> </shortcodes> </wpml-config> Then edit the page with Divi slightly where the shortcode is called (add a character or space) to refresh WPML elements, this will add the form ID to be translated to the translation editor, Best, |
mars 17, 2025 at 4:50 pm #16826584 | |
victorM-56 |
Hi, Thanks for your answer. As explained, I already put this XML but impossible to see form ID in the translation editor. I tried again today (with a small modification on source page), no ID. Thanks for your help, Victor |
mars 18, 2025 at 12:53 am #16827450 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, I would like to ask for temporary access to your test site’s wp-admin and FTP to investigate the issue further. It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/ If you do not see the form below, please do not enter your credentials as they will be publicly exposed: lien caché For your privacy and security, please ensure that you make your reply a private one. Best regards, |
mars 18, 2025 at 10:38 pm #16832799 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, What is interesting about this, is that the XML solution suggested before used to work and now it is not, I kept debugging to understand the issue, but it seems translating shortcodes in general is not possible when they are called like that, at least for the time being, I have sent your site to our developers to get a second opinion, In the meantime, you can simply change the ID manually by editing the translation directly using Divi, I will get back to you with more details, |
mars 19, 2025 at 10:09 am #16834347 | |
victorM-56 |
Hello, |
mars 20, 2025 at 7:06 pm #16841719 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, You are right, this is just a temporary solution until I get a response from our team, So the thing is that FluentForm is not compatible with WPML, hence this shortcode is not coded to be translated, You could actually debug the shortcode and modify it like suggested here : https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#translate-id-based-shortcodes Also, adding this code to your theme's functions.php should enable WPML to translate numbers : add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' ); Could you please save a backup of you site and test it again? Best, |
mars 22, 2025 at 6:10 pm #16847891 | |
victorM-56 |
Hello, I added with code snippet : add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' ); Unfortunately, I can't find any ID to translate. Thanks for your help |
mars 25, 2025 at 2:58 pm #16858623 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, One last step is missing, and it is to simply search for the ID using the search bar on the top : lien caché So to conclude, here are all the things to do in otder to translate this shortcode ID : 1- Add this XML to the configuration file : <wpml-config> <shortcodes> <shortcode> <tag>fluentform</tag> <attributes> <attribute>ID</attribute> </attributes> </shortcode> </shortcodes> </wpml-config> 2- Add this code at the top of your theme's functions.php: add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' ); 3- Apply a small edit to the original page where the shortcode is called. I couldn't apply it for you on your site as the access seems to be expired, could you share another access as I would need it for your rank math ticket, Best, |
mars 25, 2025 at 3:57 pm #16858882 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Okay, this happens specifically if the ID is part of a Toggle in DIVI, this is a compatibility issue, I will recreate the issue on a new wordpress installation, and get back to you asap, Best, |
mars 25, 2025 at 4:34 pm #16859088 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello again, I would need your help as the issue is not replicating on a new installation, Please access this sandbox : lien caché I have made the same changes I suggested before with the XML and php code, and the ID is translated correctly using text and toggle divi block, Am I missing something? could you please check if I made a similar block? PS: English form is ID=3 and French is ID=4. Best, |
mars 25, 2025 at 4:57 pm #16859149 | |
victorM-56 |
I tried your sandbox. Maybe something is not good instaled on my WPML. |
mars 25, 2025 at 5:10 pm #16859209 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Since the issue only happens specifically on the live site, so you have a staging/testing version where you could disable plugins? Please check if the issue persists in a minimal environment by following these steps. If the issue is gone, activate them one by one to see which one there is causing an interaction issue. Best regards, |
mars 25, 2025 at 6:55 pm #16859613 | |
Ilyes Supporter
Les langues: Anglais (English ) Français (Français ) Arabe (العربية ) Fuseau horaire: Pacific/Easter (GMT-06:00) |
Hello, While checking the rank math media issue, I noticed that the forms IDs are now loading : lien caché Could you check again ? |