Skip Navigation

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

Problem:
The client is experiencing a critical error when opening the products section in the Arabic interface of their website. The error was traced back to an invalid character in the Arabic translation of a string used in WooCommerce.

'Uncaught ValueError: Unknown format specifier "�" in /wordpress/plugins/woocommerce/8.9.2/includes/class-wc-breadcrumb.php:377'

Solution:
We recommended to correct the Arabic translation for the string "ID: %d " in WPML → String Translation. If you're experiencing this issue, we recommend you check the translation for any unrecognized characters and correct them accordingly.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. 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 11 replies, has 3 voices.

Last updated by Andrey 3 months, 2 weeks ago.

Assisted by: Andrey.

Author Posts
June 5, 2024 at 9:19 pm #15708842

miraN-2

Background of the issue:
I am trying to open the products section in the Arabic interface of our website hidden link. When I do this, it gives a critical error warning and does not display any products. Here is a screenshot to show the situation: hidden link

Symptoms:
Critical error warning on the products section in the Arabic interface of the website.

Questions:
Can you help resolve the critical error on the products section in the Arabic interface?

June 5, 2024 at 9:28 pm #15708890

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please create a copy/stage of the site and try running the site with minimal setup to see if the problem persists?

1) Disable any additional plugins apart from WooCommerce, WPML and our add-ons. Now test again.

2) If this didn't resolve the issue, please switch to a default theme like Twenty Twenty-One to see if the issue might be related to the theme.

3) If this still does not clarify what is causing the issue, start reactivating the plugins one by one or activate them in small groups. Do this to check where the problem is reoccurring to see which plugin is causing the problem.

Once we have been able to identify the cause, we can then attempt to replicate the problem and then escalate it internally. In this case, I provide a test site with WPML.

In case the issue persists while testing with a default theme and only WPML plugins, then I need access to your site for further investigation.

If you are having issues with running those tests, then please let me know and I will offer you my assistance.

Best regards
Andreas

June 6, 2024 at 2:29 pm #15711955

Andrey
Supporter

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

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

Thank you for sharing the details. The SFTP access doesn't lead to your current WP installation. Could you please check this?

We need to see what the errors are. The first step is to enable debugging. 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.

June 7, 2024 at 1:08 pm #15716672

miraN-2

Hi there,
I talked with WordPress support and they did what you said so they turned on it. Here is conversation
hidden link
And ı don’t see anything, all same

June 8, 2024 at 1:40 pm #15718333

miraN-2

hidden link
hidden link

Here is ss. A situation that the WordPress support team wants me to share with you to solve the problem.

June 10, 2024 at 2:00 pm #15722486

Andrey
Supporter

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

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

Thank you for sharing this information. The fatal error seems to be coming from the WooCommerce plugin. Could you provide the entire error message?

June 10, 2024 at 2:51 pm #15722791

miraN-2

ki: However, I have also checked the site logs for any recent critical errors, which you can do so here; hidden link
Happiness Engineer: I see a 'Uncaught ValueError: Unknown format specifier "�" in /wordpress/plugins/woocommerce/8.9.2/includes/class-wc-breadcrumb.php:377'
Happiness Engineer: Likely, there is an invalid or unrecognized character being used somewhere.
I also see a similar error earlier on here; 'PHP Fatal error: Uncaught ValueError: Unknown format specifier "�" in /wordpress/plugins/woocommerce/8.9.2/includes/admin/list-tables/class-wc-admin-list-table-products.php:84
Stack trace:'
Happiness Engineer: Regarding these particular fatal errors, I am going to contact WooCommerce on your behalf.
As for more information from you, is there any particular product or page URL that you notice these critical errors occur on? Can you share a specific product name or URL?
Happiness Engineer: Ah, I can see the issue is with the item you listed above 'Frudia My Orchard Aloe Vera Real Soothing Body Lotion 300g'
Happiness Engineer diyor ki: I see you have added an Arabic translation for this via wpml, this is what is causing the fatal error

Happiness Engineeri: So you can actually share this above information witth the WPML support team as you have been doing

This is exact problem, they said to share these info with you

June 10, 2024 at 6:16 pm #15723630

Andrey
Supporter

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

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

Thank you for the updates. Could you please check the SFTP access? It doesn't lead to your current WP installation. The following reply is private.

June 11, 2024 at 10:42 am #15726046

miraN-2

hidden link

Wordpress support team gave me this info to share with you
Hi there! We wanted to follow up with our investigation about the critical error on the Arabic translation with WPML.
You can share the following information with the plugin developer

June 11, 2024 at 1:50 pm #15727179

Andrey
Supporter

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

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

Thank you for the update. Could you please check this now?

I have corrected the Arabic translation for the string "ID: %d " in WPML → String Translation.

June 11, 2024 at 5:36 pm #15728505

miraN-2

hidden link

Now it’s working very well thank you to help sir, ı appreciate

June 11, 2024 at 6:32 pm #15728697

Andrey
Supporter

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

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

Great! Thank you. Have a nice day 🙂

miraN-2 confirmed that the issue was resolved on 2024-06-11 17:36:36.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.