This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported that when switching to Italian on their website, only the header appeared and the rest of the site disappeared unless logged in as an admin. Additionally, there were permission issues with .mo files and a fatal error related to a string translation.
Solution:
We recommended the following steps to identify and resolve the issue:
1. Create a staging copy of the site.
2. Update all outdated plugins and themes.
3. Flush any existing cache.
4. Deactivate all plugins, including WPML, and switch to a default WordPress theme like Twenty Twenty.
5. Enable debug mode by following the guide at https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/.
6. Reactivate WPML plugins and then activate the theme and other plugins one by one to isolate the issue.
7. Check for any fatal error messages in the debug.log file.
8. Ensure the privacy policy page is translated and published in all languages.
9. Contact the hosting provider to check and fix permission issues on the wp-content/languages folder.
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, please visit https://wpml.org/known-issues/ to check for related known issues. Confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance 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.
Tagged: Exception
This topic contains 13 replies, has 2 voices.
Last updated by Carlos Rojas 3 weeks, 5 days ago.
Assisted by: Carlos Rojas.
Author | Posts |
---|---|
May 16, 2024 at 9:33 am #15634170 | |
leventeK-5 |
Tell us what you are trying to do? What is the link to your site? |
May 16, 2024 at 10:25 am #15634410 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Hello, This behavior seems to be caused by an error. Please follow these steps in order to isolate the cause of the issue: Could you tell me the results of the steps described above? Regards, |
May 17, 2024 at 12:05 pm #15639541 | |
leventeK-5 |
Hello! I have moved the website to a staging, and there everything works ok. The pages appear in Italian. But it gives me an error, I attach the picture. Could this be the problem on the live site? The .mo files? |
May 17, 2024 at 12:32 pm #15639654 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, The error message in the staging site happens because WPML has no permission to write the .mo files. Contact your hosting providers to solve this problem. Note: If the issue disappeared in the staging site, then I recommend you restore the site in the production environment and check if it works correctly this time, as this might have been a problem in the database fixed when restored. |
May 21, 2024 at 7:27 am #15648305 | |
leventeK-5 |
Hello! |
May 21, 2024 at 8:18 am #15648567 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Hi there, In this case, you should contact your hosting providers and ask them to check the reading/writing permission on the wp-content/languages folder and files within, because everything points to a permission problem on the server-side. |
May 21, 2024 at 9:42 am #15649317 | |
leventeK-5 |
777 is set to permissions, but it still doesn't work correctly. I attach pictures below. Debug infoes: |
May 21, 2024 at 9:58 am #15649483 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Please activate the debug mode by following the steps described in this guide: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ -> Then reproduce the problem in the Italian version and then share any Fatal Error that might appear in the debug.log file located within the wp-content folder. |
May 21, 2024 at 10:58 am #15650076 | |
leventeK-5 |
That's the fatal error. Only in Italian I received this error. In English and German, everything is okay. [21-May-2024 10:55:18 UTC] PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /var/www/html/wp-content/plugins/woocommerce/includes/wc-template-functions.php:864 Stack trace: |
May 21, 2024 at 11:00 am #15650079 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Hi, Please check if the privacy policy page is translated and published in all languages. |
May 21, 2024 at 12:17 pm #15650376 | |
leventeK-5 |
Still not working. Just if i logged in as admin in wp-admin. Maybe this information can help you? [21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 394 |
May 21, 2024 at 12:46 pm #15650548 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Thank you very much for sharing this information. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Our Debugging Procedures I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to back up the site before providing us access. If we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site. |
May 22, 2024 at 7:38 am #15654430 | |
leventeK-5 |
Thanks for help. I resolved the problem. The problem was I translated wrong a string: Have a great day. |
May 22, 2024 at 8:08 am #15655633 | |
Carlos Rojas Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Madrid (GMT+02:00) |
Hi there, I'm glad to hear that the issue is solved 🙂 Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help. |
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.