[Waiting for user feedback] structure of links change
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.
Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Background of the issue:
I am trying to edit pages or posts using the WPML editor on my site hidden link. When I edit in the WP editor for Italian, the structure of links changes, removing the language code ../it/.. from the URLs. For example, the correct link hidden link changes to hidden link after saving. I discovered that deactivating the String translation plugin allows editing to be saved, but then the menu links do not work.
Symptoms:
1. HTML content fills with a lot of <br> tags between elements when using the WPML editor. The structure of links changes, removing the language code ../it/.., and these changes cannot be saved.
2. Problems with String translation plugin
Questions:
Why does the WPML editor add extra <br> tags between elements?
Why does the link structure change and remove the language code when editing in the WP editor?
How can I save the correct link structure with the language code?
Why does deactivating the String translation plugin affect menu links?
I apologize for the delay in replying. I will take care of this ticket and reply time will be shorter now.
When you say you are using WPML editor you mean the classic or the advanced translation editor?
After translating the page with the WPML editor it looks like you are editing it using the WP editor, is that correct? Why? That's not recommended and may cause some issues. I suggest picking a translation method and sticking with it. If needed you can use the WP editor only on some pages, but even then you should not mix editors.
Can you also elaborate a bit on how the links are added to the original content? Are you using a page builder? Are you using a special block? Is it inside other blocks?
If it's possible for you, please do this test:
I suggest you try this to help us identify if it might be a conflict with another plugin or theme that is causing the problem.
**IMPORTANT:** Please try this in a staging environment or at least with a backup of your site files and database before continuing.
Disable all plugins except WPML-related and temporarily change the theme to a default WordPress such as Twenty Twenty-five.
Is the issue resolved with these settings? If so, re-activate one by one to see which one is causing the problem.
i use the wpml classic editor.
My content is in the simple html block.
The problem is like this.
I make a new post in original lang that is Greek, and i translated to english in wpml editor. After that if i try to edit again the english in wpml editor, then I find the code changed, with many <br>.
For example.
When i have this:
<div>
<h2>This is a title</h2>
<p>This is the text in the page.</p>
<div>
Change to this:
<div><br><h2>This is a title</h2><br><br><p>This is the text in the page.</p><br><br><br><div>
Change the style of the code, put a <br> for each line...
Also i deactivate everything, and the problem continue.
But i think that when i deactivate String translation plugin works better, am not sure about that.
With the installation of the wpml new version there was an improvement.
With the installation of the pach there was also a small improvement, while it stopped adding the <br> and started adding the <br/>.
Also for e few pages the editor looks like the photo. This was happening even before the above upgrades.
I am sorry, I don't understand what are the issues remaining after the update. Is it the same issue or a new one? Can you please elaborate a bit more and provide me with to reproduce the problem on my end?