[Resolved] Critical Error for Product page in Arabic Surface
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.
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?
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.
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.
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
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
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
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.