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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: America/Los_Angeles (GMT-08:00)
Tagged: Exception
This topic contains 7 replies, has 2 voices.
Last updated by Bobby 1 year, 4 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
September 27, 2023 at 12:23 am #14469889 | |
Stephen Merriman |
A client's site was developed on a staging URL, then shifted to the live site with all occurrences of the URL replaced in the site's database. While it worked initially, some translated portions are now showing in English - in particular, those that include a URL inside a translated string. When I go into the Translation Editor, both the 'original' and 'translation to' columns contain the staging URL, even though the live URL appears in the original post's content (and the staging URL does not appear anywhere in the database) - see screenshot. It appears WPML is incorrectly storing the staging URL somewhere - outside of the database, perhaps in PO/MO files hardcoded on the server somewhere - and since this doesn't match the actual content, it's not finding the translation. I've seen past forum responses where you suggest manually deleting the translation and then retranslating it. We don't want to do that as there are a large number to fix. I'm not even entirely sure how this would work, since the 'original' can't be edited and is wrong. If WPML is storing the wrong domain for the site somewhere, can you please advise on getting these automatically replaced with the right domain? |
September 27, 2023 at 7:08 pm #14476939 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi there, Please try this first and let me know your results: go to pages and edit this page in the default language. Make a small change and update it, then access the translation again. Does it work OK now? This should trigger an update without the need of deleting the translation. |
September 28, 2023 at 2:00 am #14478083 | |
Stephen Merriman |
Updating the page and reaccessing the translation editor resulted in the English versions having the right URL, but the translated versions all being blank. So they all had to be manually retranslated, which is what we were wanting to avoid. How can the domain update be made in a better way? |
September 28, 2023 at 9:08 pm #14484749 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you for updating me! This should not happen unless the editor used was changed from Classic Editor to Advanced Translation Editor. Are you aware of such change? Unfortunately, the only workaround would be to do the following: 1. View the page in the front end |
September 28, 2023 at 9:37 pm #14484799 | |
Stephen Merriman |
I think you're misunderstanding the problem. Manually editing the page isn't a solution because the pages themselves do not contain the incorrect URLs. As mentioned, there are no references to the staging URL at all anywhere in the database. The only references to the staging URL are in the Advanced Editor. All I can imagine is that you are storing the original->translation mapping somewhere hardcoded on the server (like json / mo / po) files, and those files don't get updated when a site is migrated from a staging server to a live server. That leads to the mapping for the new URL getting lost, which is why they don't automatically translate. So the question is - where are you storing this information if not in the database, and how can you support these URLs getting automatically updated during a migration? |
September 28, 2023 at 9:47 pm #14484833 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
I see, thank you for the explanation. Yes, the ATE content is saved in a cloud server and will not be located on your site's database. that should not cause an issue when a site is moved as many users do this quite often. I would like to understand the workflow here better: 1. Originally did you use the Classic Editor or the Advanced Translation editor to make the translations? Moving from the Classic Editor to ATE will cause your original translations to be lost. 2. Share with me a link to a page where I can see the issue now on the site. |
September 28, 2023 at 10:22 pm #14484917 | |
Stephen Merriman |
Only the ATE. I can't share a page right now because as the translations disappeared after making the update mentioned above, we had to manually retranslate them - so they're working now, but are trying to figure out the cause. At what point does your cloud server become aware of the change in domain and perform a search/replace on your end? |
September 29, 2023 at 10:07 pm #14490235 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Notice in the screeshot first shared with me here: That is the Classic Translation Editor, meaning that switching to the ATE editor would remove the translation requiring you to re-do them. "If you switch to using the Advanced Translation Editor, any content previously translated using the Classic Translation Editor will not be visible in the Advanced Translation Editor. However, they will still be visible on the site’s front-end. You can copy and paste the existing translations from your site’s front-end or click the Translate automatically button in the Advanced Translation Editor to easily add translations." Documentation: https://wpml.org/faq/why-arent-my-translations-showing/ Our ATE server recognizes the change with no problem when a site has been moved, I am not sure of the exact timing but I am positive we have no known issues with this behavior. For example, we could create a page with an internal link -> translate it and then move the site to our cloudays staging environment you would notice that the URL will be updated. |
The topic ‘[Closed] Staging site URL preventing translations, even though not in MySQL database’ is closed to new replies.