Home›Support›English Support›[Resolved] WPML adding superfluous paragraph p tag to to the translations, causing unwanted line break
[Resolved] WPML adding superfluous paragraph p tag to to the translations, causing unwanted line break
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is trying to translate a text widget in Elementor using the Classic Translation Editor (CTE) and is concerned about the support and compatibility of CTE with the Advanced Translation Editor (ATE). The client noticed that translating with CTE adds an HTML paragraph to the text and is unsure if this behavior is expected. Solution: We confirmed that when translating with CTE, it is expected behavior for an HTML paragraph tag to be added by Elementor, as this tag usually already exists on the original content. We have confirmed this on a test site running only Elementor. We also clarified that CTE and ATE are not fully compatible because they function differently. Translations done in CTE cannot be migrated to ATE due to different system architectures, including translation memory. However, clients can switch back from ATE to CTE and continue using their translations. If switching from CTE to ATE, translations need to be redone because ATE has its own translation memory. For more details, visit how WPML keeps track of your translations and switching from classic to advanced translation editor.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also highly suggest 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. For further assistance, please visit our support forum at WPML support forum.
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 a simple Elementor text widget containing the English text "Verification pending". The issue can be seen on this page: hidden link. I expected to see the German translation "Verifizierung ausstehend" in the same place as the English original.
Symptoms:
WPML is adding an extraneous p tag around the translated text, causing an extra line break and breaking the middle-aligned design on the page.
PS I tried translating it 3 different ways, with
1) String Translation
2) Sending it through the cumbersome Translation Mgmt route
3) Just clicking the pencil icon in the flag column under Pages
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
According to the markup, a Elementor Widget is used for this content.
Elementor content always needs to get translated with the WPML Translation Editor.
I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.
You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.
IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private response form looks like this: hidden link
Next time you reply, click "I still need assistance."
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.
It says in WPML settings the recommended editor is Classic Editor for translations created using the Classic Translation Editor.
I'm happy to use a more advanced translation editor as long as I don't lose the ability to go back to Classic Editor if necessary and don't suddenly have to review every page for translations or re-translate all my Views, Pages, WordPress Archives and Pages.
I also don't wanna get involved in translation credits or such or have anything translated automatically.
Is the Classic Editor no longer supported, or reaching the end of support lifecycle in the future?
After digging a bit more, apparently there are still issues switching to the Advanced Translator which still need to be fixed (is WPML working on this?).
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
The Classic Translation Editor and Advanced Translation Editor are not fully compatible which is not really an issue. It is expected, as they function differently.
You can switch back from ATE to CTE and keep using your translations.
If you switch from CTE to ATE the translation need to be redone. The reason is, that the ATE has its own translation memory, besides other features. It is not possible to migrate any translation memory from CTE to ATE as CTe does not have a translation memory.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I have created the following test site:
One-Click-Login: hidden link
Elementor and WPML are installed and I tried to recreate the issue using the Classic Translation Editor.
The paragraph is automatically inserted into the original content by Elementor. This is also the case when I test without WPML. So it would also be expected in the translation.
That may be the case on your basic test site, but as you can see from my original problem description, the HTML produced in the original taken from the browser Inspector does NOT contain the paragraph tag.
It would be OK with the paragraph tag in both, or neither. However it cannot be different in both the languages, as is our case. So your last response did not present us with any viable solution or workaround to the bug.
What do you mean "import the page" into the test site? I'm not sure what you're expecting from me. I have never done such an import for a support case in over 4 years of working with WPML support staff. Since you already have access to my system, can't you import what you need directly on your side to continue your research?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I am sorry if I am repeating myself, but the paragraph is expected and it is added by Elementor. If your original content is not using a paragraph by default, then this is unexpected.
No worries, I will take care of exporting and import the page using Dashboard > Tools > Export and Dasshboard > Tools > Import (native WordPress Feature).
As soon I am done testing, I will contact you again.