This thread is resolved. Here is a description of the problem and solution.
Problem:
Hard-coded strings translation is not working. The strings only show when the option Look for strings while pages are rendered is enabled.
Solution:
In this case, the problem was stuck transients in the wp-options table in the DB.
1. Take a backup of the DB of your site or a full backup of your site.
2. Edit the DB of your site with the interface your server uses, for example, phpMyAdmin.
3. In the wp_options table, search for the option_name = _transient_wpml_st_upgrade_in_progress.
4. Delete this row.
Now the strings should show the translations on the front end.
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.
Tagged: Documentation request
This topic contains 31 replies, has 2 voices.
Last updated by Mark 1 year, 3 months ago.
Assisted by: Itamar.
Author | Posts |
---|---|
December 26, 2022 at 10:39 am | |
Mark |
We recently updated the WPML plugin to the latest version, after which we are facing an issue with the string translation. |
December 26, 2022 at 12:35 pm | |
December 26, 2022 at 3:31 pm #12714225 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I'll wait for your reply in case, you need more help with this issue. Regards, |
December 27, 2022 at 8:57 am #12716577 | |
Mark |
Hi again, |
December 27, 2022 at 7:10 pm #12719393 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Thanks, I've made a copy of your site with the Duplicator plugin (now removed). I'll continue to investigate this issue on my local server and will update you here as soon as I have news. Thank you for your patience. |
December 27, 2022 at 9:43 pm #12719819 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, It seems your site has some custom configurations that I could not spot. With the copy of your site on my local server, I could not work with the Language URL format: Different languages in directories. But when I switched to the Language URL format: Language name added as a parameter, things started to work. And the string from the theme showed the translation. Please see the attached screenshot. You are using the Boccia theme By Oakwood Creative Digital Agency. This theme is not known to us. Is it a custom theme created for your site? Regards, |
December 28, 2022 at 3:21 am #12720559 | |
Mark |
Yes, it is a custom theme. |
December 28, 2022 at 8:38 am #12721335 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I suspect that custom configurations on your site cause this problem. I could not replicate this issue on my test site with a clean WordPress installation and the twenty-twenty theme. So as far as I can tell, there is no bug in WPML. But I may be wrong, and if so, I need your help replicating this issue. Here is a link to a sandbox site with a fresh WordPress installation. With this link, you'll be directly logged in. hidden link I've configured WPML on this site. German is the default language, and English is the second language. Strings Translation is enabled. And the Twenty Twenty-One is active. If you can replicate this problem on the sandbox site please let me know the steps you took and I'll escalate the issue to our second-tier supporters. Thanks, |
December 28, 2022 at 9:44 am #12721655 | |
Mark |
In regard to what you have mentioned, we already have tried this ourselves as well. We created a fresh WP installation and tested the string translations ourselves and it worked as it should. Further, to check if it was the theme issue, we even implemented the same boccia theme in the fresh installation and faced no issues with the string installation. |
December 28, 2022 at 11:26 am #12722217 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, and thanks for the detailed history of this case. Indeed sometimes, something breaks during an update, and it is not complete and causing problems. Do you have a backup of your site before the updates you performed? If so, then please restore the site from this backup and update it again. Then check if everything works correctly. Regards, |
December 29, 2022 at 9:02 am #12727099 | |
Mark |
As you suggested, we setup a new staging using the backup of the site we had before the update and tried updating WPML again and the issue still persists. |
December 30, 2022 at 10:08 am #12732095 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, and thanks for trying my suggestions. I need to consult our second-tier supporters regarding this issue. When I have an answer from them, I'll update you here. Please note that I may be able to reply next week. Thank you for your patience. |
January 2, 2023 at 1:49 pm #12740111 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I discussed this issue with our second-tier supporter, who confirmed that REST API is needed for Strings Translation to work. Please check our guide on Features in WPML that Depend on the WordPress REST API. https://wpml.org/documentation/support/rest-api-dependencies/ So we believe Strings Translation should work after fixing the REST API issue on your server. Regards, |
January 3, 2023 at 6:42 am #12742969 | |
Mark |
Thanks for your reply. As suggested, we went through the guide and checked whether the REST API endpoints mentioned were working or not. Upon testing we found that both the end points seem to be working and returning information. We tested both the endpoints as logged in and logged out users and in both cases the endpoints are working. Please see attached (Screenshot_wpml-st-v1.png and Screenshot_wpml-tm-v1.png). However, the WordPress information section under the support page still shows the REST API as disabled (See attached: rest-api-status.png). Are there any further steps that we could take to debug this issue? We have tried debugging the issue ourselves and gone through a lot of support forums looking for the solution to the issue we are facing however, we have not been able to find a working solution yet. Thank You |
January 3, 2023 at 3:46 pm #12746059 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I've shared this information with our second-tier supporter and am waiting for his reply. I'll keep you updated here. Thank you for your patience. |