Skip to content Skip to sidebar

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

Problem:
The client reported that after translating elements, the shop page on their website appeared broken, displaying a PHP Fatal error related to an unknown format specifier in a theme file.
Solution:
We identified the error in the file

wp-content/themes/furety/woocommerce/loop/pagination.php

on line 41. The issue was due to an incorrectly translated string. We removed the incorrect translation and re-translated it correctly. We recommend checking the translated shop page to ensure the issue is resolved.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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

Last updated by Osama Mersal 11 months, 4 weeks ago.

Assisted by: Osama Mersal.

Author Posts
August 16, 2024 at 11:19 am #16078123

aigarsB

Thank you for your help, seems that there have been translated a lot of elements. But there are still some issues, after translations the hidden link page seems to be broken. Could you please help me with that?

August 16, 2024 at 11:21 am #16078128

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Please provide the WordPress debug.log; this will allow us to see if any PHP errors are being produced. More Info.

To enable it, open your wp-config.php file and look for the following line:

define('WP_DEBUG', false);

And change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings, which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then, try reproducing the issue (Going to the translated shop page) and checking if any errors were saved to the debug.log log file inside the /wp-content/ directory.

Please paste your debug.log to https://pastebin.com/ and provide me with that link!

Best regards,
Osama

August 19, 2024 at 1:25 pm #16083862

aigarsB

Hi,

Thank you for your help.

Here is the link to the pastebin with the error logs that where generated after visiting the ledalo.com/de/shop page: https://pastebin.com/yPqJjkWe

Regards,

August 19, 2024 at 1:32 pm #16083922

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for the log. Here is the error:

[19-Aug-2024 13:21:15 UTC] PHP Fatal error:  Uncaught ValueError: Unknown format specifier "v" in /home/u703839026/domains/ledalo.com/public_html/wp-content/themes/furety/woocommerce/loop/pagination.php:41
Stack trace:
#0 /home/u703839026/domains/ledalo.com/public_html/wp-content/themes/furety/woocommerce/loop/pagination.php(41): printf()
#1 /home/u703839026/domains/ledalo.com/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/u70383902...')
#2 /home/u703839026/domains/ledalo.com/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1567): wc_get_template()
#3 /home/u703839026/domains/ledalo.com/public_html/wp-includes/class-wp-hook.php(324): woocommerce_pagination()
#4 /home/u703839026/domains/ledalo.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#5 /home/u703839026/domains/ledalo.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#6 /home/u703839026/domains/ledalo.com/public_html/wp-content/themes/furety/woocommerce/archive-product.php(95): do_action()
#7 /home/u703839026/domains/ledalo.com/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/u70383902...')
#8 /home/u703839026/domains/ledalo.com/public_html/wp-content/plugins/woocommerce/templates/taxonomy-product-attribute.php(22): wc_get_template()
#9 /home/u703839026/domains/ledalo.com/public_html/wp-includes/template-loader.php(106): include('/home/u70383902...')
#10 /home/u703839026/domains/ledalo.com/public_html/wp-blog-header.php(19): require_once('/home/u70383902...')
#11 /home/u703839026/domains/ledalo.com/public_html/index.php(17): require('/home/u70383902...')
#12 {main}
  thrown in /home/u703839026/domains/ledalo.com/public_html/wp-content/themes/furety/woocommerce/loop/pagination.php on line 41

The error is caused by the (wp-content/themes/furety/woocommerce/loop/pagination.php on line 41) file.

I checked the mentioned line and found that hidden link">this string (Showing %1$d–%2$d of %3$d item(s)) is not translated correctly.

I deleted its translation and re-translated it, which fixed the issue. Please check the translated hidden link">shop page.

Best regards,
Osama

August 21, 2024 at 7:32 am #16088876

aigarsB

Thank you. This issue seems to be resolved.