Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client reported that a part of the translations was missing on the frontend of their website, even though the translations were present in the backend.
Solution:
Firstly, we recommended that the client update their WPML plugin and add-ons to the latest version to ensure they have all the recent bug fixes and improvements. We provided instructions for updating WPML and suggested backing up the database before proceeding, recommending the Duplicator plugin for this purpose.

After the client updated the plugins, we identified a PHP fatal error in the theme's file

section-hohtomaten.php

on line 12. We advised the client to contact their theme developer to resolve this error, as it was likely preventing the page from fully loading and displaying the translations on the frontend.

If you're experiencing a similar issue, we recommend you first update your WPML plugin and add-ons, and then check for any errors in your theme files. If the solution provided here is not relevant to your case, perhaps because it's outdated or doesn't apply to your situation, please check the related known issues and confirm that you have installed the latest versions of your themes and plugins. If the issue persists, we highly recommend opening a new support ticket with us for further assistance.

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 7 replies, has 2 voices.

Last updated by Andrey 1 year, 12 months ago.

Assisted by: Andrey.

Author Posts
April 7, 2024 at 5:47 pm #15491888

quintE

Hello,

I'm missing a part of the translations on the frontend. The page is translated and translations are there in the backend, but missing on the frontend.

Please check: hidden link (compared with hidden link)

You can see the bottom part of the page is missing. I can't find out why. Maybe you can see what is going wrong.

April 7, 2024 at 6:47 pm #15491943

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Could you please update your WPML plugin to the latest version 4.6.10 and add-ons to benefit from the latest bug fixes and improvements? This may not necessarily resolve your problem, however, in order to troubleshoot the issue best we need to work on the latest code available.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

Please remember to backup your database first before you proceed. You can use a plugin for this if you like (example: http://wordpress.org/plugins/duplicator/)

Let me know if the issue persists after an update has been done.

April 8, 2024 at 10:04 am #15493498

quintE

Hi Andrey,

I updated the WPML plugin but (as you suggested) the problem is still there.

Hope you can help me.

Best regards,

Quint Engel

April 8, 2024 at 7:59 pm #15496062

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

It looks like the page is not fully loaded. It could be due to some fatal error on the translated page.

Please enable the enable debug.log. You can add a few lines to the site’s wp-config.php file. With the error log enabled, you will see the actual problem.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

In order to enable the error logging to a file on the server you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

In this case, the errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see after the debug mode has been enabled.

April 9, 2024 at 8:15 am #15497304

quintE

Hi Andrey,

I activated the debug log. I see some errors, but maybe you can point me in the right direction because I don't really understand what the problem is looking at all the notices and errors.

Thank you in advance.

Best regards,

Quint

April 9, 2024 at 1:49 pm #15499540

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Could you please share here the content of the debug.log? If there are any errors, the debug.log will be created automatically. You can delete it and view the translated page, and then share the contents of the debug.log.

April 10, 2024 at 8:13 pm #15506404

quintE

Hi,

I deleted the debug file and visited the page with missing content (hidden link).

This is in the debug log file:

[10-Apr-2024 20:11:08 UTC] PHP Notice: Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the animate-style handle. Please see <a>Debugging in WordPress for more information. (This message was added in version 3.3.0.) in D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\functions.php on line 6031
[10-Apr-2024 20:11:08 UTC] PHP Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the animate-js handle. Please see <a>Debugging in WordPress for more information. (This message was added in version 3.3.0.) in D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\functions.php on line 6031
[10-Apr-2024 20:11:09 UTC] PHP Warning: Array to string conversion in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\plugins\advanced-custom-fields-pro\includes\api\api-template.php on line 868
[10-Apr-2024 20:11:09 UTC] PHP Warning: Array to string conversion in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\plugins\advanced-custom-fields-pro\includes\api\api-template.php on line 884
[10-Apr-2024 20:11:09 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\hoh-blocks\section-hohtomaten.php:12
Stack trace:
#0 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template.php(792): require()
#1 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template.php(725): load_template()
#2 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\general-template.php(206): locate_template()
#3 D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\page-home.php(19): get_template_part()
#4 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template-loader.php(106): include('...')
#5 D:\vhosts\harvestofhealth.nl\httpdocs\wp-blog-header.php(19): require_once('...')
#6 D:\vhosts\harvestofhealth.nl\httpdocs\index.php(17): require('...')
#7 {main}
thrown in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\hoh-blocks\section-hohtomaten.php on line 12
[10-Apr-2024 20:11:10 UTC] PHP Notice: Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the animate-style handle. Please see <a>Debugging in WordPress for more information. (This message was added in version 3.3.0.) in D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\functions.php on line 6031
[10-Apr-2024 20:11:10 UTC] PHP Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the animate-js handle. Please see <a>Debugging in WordPress for more information. (This message was added in version 3.3.0.) in D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\functions.php on line 6031

Hope you can see what is going wrong.

Thank you ins advance.

Best regards, Quint

April 10, 2024 at 8:54 pm #15506526

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for sharing the information. I noticed the following error that probably prevented the page from fully loaded:

[10-Apr-2024 20:11:09 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\hoh-blocks\section-hohtomaten.php:12
Stack trace:
#0 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template.php(792): require()
#1 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template.php(725): load_template()
#2 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\general-template.php(206): locate_template()
#3 D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\page-home.php(19): get_template_part()
#4 D:\vhosts\harvestofhealth.nl\httpdocs\wp-includes\template-loader.php(106): include('...')
#5 D:\vhosts\harvestofhealth.nl\httpdocs\wp-blog-header.php(19): require_once('...')
#6 D:\vhosts\harvestofhealth.nl\httpdocs\index.php(17): require('...')
#7 {main}
thrown in D:\vhosts\harvestofhealth.nl\httpdocs\wp-content\themes\hoh\hoh-blocks\section-hohtomaten.php on line 12

The theme you are using has a fatal error on line 12 in the section-hohtomaten.php file. You need to contact your theme developer and ask him to handle this error.

April 16, 2024 at 1:44 pm #15525846

quintE

Theme developer fixed the problem. Thanks for your time.