[Resolved] Tag Causing Incomplete Translation Rendering on Frontend Pages
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with translating pages from English to Spanish using WPML, specifically where text blocks contain the
<sup>
tag. The translation stops rendering after the
<sup>
tag, and although the translation job is marked as complete, the page remains in draft and is not publicly accessible. Solution: The issue arises due to insufficient translation credits assigned to the client's site. To resolve this, we recommend checking the credit balance and ensuring enough credits are available for the translation tasks. You can assign credits to your site. Additionally, consider registering for the Pay-as-you-go option if frequent translations are needed.
If this solution does not apply to your case, or if it seems outdated, 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. Should you need further assistance, 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:
Edit and publish a translation of several pages on our client’s site from English to Spanish using WPML. The original content includes <sup> HTML tags in some text blocks. In the WPML Translation Editor, the correct Spanish translations are fully entered and saved.
Symptoms:
On certain translated pages, any content that includes a <sup> tag appears to prevent the rest of the text block from rendering in the translated language. The content following the <sup> tag remains untranslated, or the translation stops entirely at that point. When attempting to "complete" a translation job, while it is marked as complete in the translation job list, it is still in draft as the page is not accessible publicly.
Questions:
Why does the <sup> tag cause the translation to stop rendering?
How can I ensure that the entire page content, including <sup> tags, displays correctly in the translated version and why are pages remaining in draft even when the translation status is "complete"?
Welcome to WPML support. I will answer this question before the ticket is assigned to one of my colleagues.
Would you please first update WPML to the latest version?
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > Plugins > Add new > Commercial (tab)".
- Click the "Check for Updates" button.
- Update WPML and its addons there.
After that please test if the same thing happens on a minimal installation:
- IMPORTANT STEP! Create a backup of your website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except WPML and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.
Finally, what happens if you add a sample page and use <sup> in the content?
The recent update seems to resolve this issue once we run pages back through translation. The next issue is that the client has run out of credit due to this. Considering this was a bug, how can the client get those credits back? We still have several pages that need to be run through again.
The Advanced Translation Editor has a memory feature. When you send those pages for translation, the memory should be applied, and you should not be charged with automatic translation credits for this. Please let me know if otherwise.
As I mentioned earlier, pages and post types need to be retranslated in order for this bug to resolve and for pages to appear correctly in Spanish. We run ours through automatic translation. It doesn't seem to matter whether I choose "Leave existing translations as they are" or "Overwrite existing translations." We receive the message "Out of Credits for Automatic Translation
Translation not running... there is an issue that needs your attention. Fix it to continue."
The translations are stuck because you have only 38 credits assigned to hidden link, and it is not enough for the translations you want to send. When they are sent, and if the content has already been translated, the Advanced Translation Editor will apply the translation memory to those jobs, and no credits will be charged for those specific strings. What you need to do is to have credits to this site or register for the Pay-as-you-go option.
As a gesture of good courtesy, we've added 12,268 credits to your wpml.org account. (You had zero credits in your account.) This is the number of credits you spent in June for hidden link. You can assign them to the site to resolve the issue with the stuck translation due to a lack of credits.