There is a bug in Menu Widget in Footer - first it didnt display in DE and FR and now when i tried to rechoose the Menu in this widget in EN original language FR menu showes up.
Thanks, I have checked, but I would need to temporarily disable some plugins and possibly switch themes to investigate further.
Please let me know if it is possible to create a staging site using the WP Staging plugin. If not, I can take a copy of the website and check it locally instead.
Thanks for your patience. I checked further and found the cause of the issue.
You are adding script code inside an Elementor HTML widget. This is not expected behavior for WPML translation tools, as they are designed to handle standard HTML content. Adding custom script code inside Elementor builder content can cause issues during translation.
When I remove the script from the widget, everything works correctly.
In your case, the best approach would be to move that custom code into a small PHP snippet and include it via a shortcode or hook instead of placing it directly inside the Elementor content.
Thank you for the explanation but this is hard for me to understand..
1. This error appeared once i migrated the website to other wordpress installation.
2. whats menu widget got to do with a HTML script ( please where is this script inserted????)
If this would be the case as you suggest the error occurs - why all was well previously?
Thank you for your message, I understand this can be confusing so let me clarify.
The script is inserted inside an HTML widget in footer template. When WPML Advanced Translation Editor (ATE) processes the content, it parses and restructures HTML. Script inside editable content (like HTML widgets) are not supported and can break the translation structure like it happens with your translated footer template.
ATE is designed to translate text content, not to safely handle JavaScript code inside editable HTML blocks. Because of this, including <script> code inside a template’s HTML widget is not recommended and can lead to broken translation jobs.
It may have worked before if:
- The content was translated using the Classic Translation Editor or manually instead of ATE
- The script was not part of the translated content previously
- The template was structured slightly differently
However, adding JavaScript inside an HTML widget that is processed by ATE is not supported and can cause issues, I know this from cases before and have tested your code on fresh website.
Best practice would be to move the script to the theme or add it via a dedicated plugin for inserting header/footer scripts
This way the script is not part of the translatable content and WPML will not attempt to process it.