Skip Navigation

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: 

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?
When I'm not logged into wp-admin and I switch to Italian, the whole site disappears, and only the header remains, but it too with a very small width.
If I am logged in as admin, everything works fine. (I attach a picture)

What is the link to your site?
hidden link

Capture.PNG
May 16, 2024 at 10:25 am #15634410

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello,
Thank you for contacting us

This behavior seems to be caused by an error. Please follow these steps in order to isolate the cause of the issue:
- Create a copy of the site
- Update any outdated plugins or theme
- Flush any cache memory that might exist
- Deactivate all plugins, including the WPML ones
- Activate a default WordPress theme, like Twenty Twenty
- Activate the debug mode by following the steps described in this guide: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
- Activate the WPML plugins
- If the issue disappeared, start by activating the theme and then the rest of the plugins, one by one, until the issue appears again and you find the culprit
- If the issue persists then check if there is any Fatal Error message in the debug.log file located within the wp-content folder.

Could you tell me the results of the steps described above?

Regards,
Carlos

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?

Capture.PNG
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!
My problem is the following:
If I change the language of the website to Italian, nothing appears, only the menu, but if I delete the wp-content/languages file, everything works fine, but I don't get the string translations. Can you advise me with the steps I should do?

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:
***

Capture.PNG
Capture.PNG
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:
#0 /var/www/html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(864): sprintf('I vostri dati p...', '[privacy_policy...')
#1 /var/www/html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(939): wc_get_privacy_policy_text('registration')
#2 /var/www/html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(923): wc_privacy_policy_text('registration')
#3 /var/www/html/wp-includes/class-wp-hook.php(324): wc_registration_privacy_policy_text('')
#4 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/functions.php(1117): do_action('woocommerce_reg...')
#7 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/theme-options/global/callbacks.php(2132): et_b_account_link(true, true, Array)
#8 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/templates/header/parts/account.php(89): header_account_callback()
#9 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/templates/header/parts/connect_block.php(102): require('/var/www/html/w...')
#10 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/theme-options/global/callbacks.php(136): require('/var/www/html/w...')
#11 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/theme-options/global/callbacks.php(196): header_content_callback('main')
#12 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/templates/header/header-main.php(32): header_main_callback()
#13 /var/www/html/wp-content/plugins/et-core-plugin/app/models/customizer/functions.php(30): require_once('/var/www/html/w...')
#14 /var/www/html/wp-includes/class-wp-hook.php(324): etheme_header_main('')
#15 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#16 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#17 /var/www/html/wp-content/themes/xstore/header.php(54): do_action('etheme_header')
#18 /var/www/html/wp-includes/template.php(810): require_once('/var/www/html/w...')
#19 /var/www/html/wp-includes/template.php(745): load_template('/var/www/html/w...', true, Array)
#20 /var/www/html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#21 /var/www/html/wp-content/themes/xstore/index.php(9): get_header()
#22 /var/www/html/wp-includes/template-loader.php(106): include('/var/www/html/w...')
#23 /var/www/html/wp-blog-header.php(19): require_once('/var/www/html/w...')
#24 /var/www/html/index.php(17): require('/var/www/html/w...')
#25 {main}

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
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 540
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_parent is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 541
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 540
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_parent is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 541
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_ancestor is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 540
[21-May-2024 12:15:07 UTC] PHP Deprecated: Creation of dynamic property WPML_LS_Menu_Item::$current_item_parent is deprecated in /var/www/html/wp-includes/nav-menu-template.php on line 541

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:
"Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our %s."
was translated as
"I vostri dati personali saranno utilizzati per supportare la vostra esperienza su questo sito web, per gestire l'accesso al vostro account e per altri scopi descritti nelle nostre %." xD

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.
Best regards,
Carlos

leventeK-5 confirmed that the issue was resolved on 2024-05-22 07:38:05.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.