This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing site crashes when switching languages, it might be due to a PHP fatal error related to incorrect string translation in your theme's WooCommerce catalog file.
Solution:
We recommend enabling WP debug to check the debug log for errors. If you find an error similar to 'Unknown format specifier "v"' in your WooCommerce catalog.php file, the issue may be resolved by re-translating the problematic string in the WPML String Translation. Ensure that all strings are correctly translated to prevent such issues.
Please note that this solution might be outdated or not applicable to your specific 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: Exception
This topic contains 8 replies, has 2 voices.
Last updated by Osama Mersal 3 months ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
August 10, 2024 at 5:05 pm #16058701 | |
patricG |
Background of the issue: Please let me know what is the problem and how to solve this as soon as possible. Thank you. Symptoms: Questions: |
August 11, 2024 at 10:33 am #16059279 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for contacting WPML forums support. I'll be glad to help you today. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Your answer will be private, meaning only you and I can access it. ❌ Please backup your database and website ❌ ✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical. ✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site. Best regards, |
August 11, 2024 at 2:25 pm #16059518 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for the access details. I checked the issues, and both are caused by the "WCBoost—Wishlist" plugin. When deactivating this plugin, the shop and home pages work correctly. Kindly deactivate it, check the translated pages, and let me know if they work as expected. Best regards, |
August 11, 2024 at 6:38 pm #16059956 | |
patricG |
thanks, home is okay now but when we switch language in shop page, we face the issue again. hidden link from german to french for example or italian to deutsch we still get a critical error |
August 12, 2024 at 8:35 am #16061061 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your reply. I enabled the WP debug and checked the debug log, which contained the following error. [12-Aug-2024 08:28:49 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier "v" in /var/www/vhosts/nois.ch/httpdocs/wp-content/themes/motta/inc/woocommerce/catalog.php:682 Stack trace: #0 /var/www/vhosts/nois.ch/httpdocs/wp-content/themes/motta/inc/woocommerce/catalog.php(682): printf() #1 /var/www/vhosts/nois.ch/httpdocs/wp-includes/class-wp-hook.php(324): Motta\WooCommerce\Catalog->result_count() #2 /var/www/vhosts/nois.ch/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #3 /var/www/vhosts/nois.ch/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /var/www/vhosts/nois.ch/httpdocs/wp-content/themes/motta/inc/woocommerce/catalog.php(641): do_action() #5 /var/www/vhosts/nois.ch/httpdocs/wp-includes/class-wp-hook.php(324): Motta\WooCommerce\Catalog->catalog_toolbar() #6 /var/www/vhosts/nois.ch/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /var/www/vhosts/nois.ch/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /var/www/vhosts/nois.ch/httpdocs/wp-content/themes/motta/woocommerce/archive-product.php(49): do_action() #9 /var/www/vhosts/nois.ch/httpdocs/wp-includes/template-loader.php(106): include('...') #10 /var/www/vhosts/nois.ch/httpdocs/wp-blog-header.php(19): require_once('...') #11 /var/www/vhosts/nois.ch/httpdocs/index.php(17): require('...') #12 {main} thrown in /var/www/vhosts/nois.ch/httpdocs/wp-content/themes/motta/inc/woocommerce/catalog.php on line 682 After checking the mentioned line, I was able to fix the issue by re-translating a string in String Translation. This hidden link">string was not translated correctly which caused the issue. Best regards, |
August 12, 2024 at 10:17 pm #16063996 | |
patricG |
I've translated the strings belonge to the footer. But when I switch language in front end, the footer texts don't change. I've tried several clean up services but no improvment happened. Could you check, please? Thank you New threads created by Osama Mersal and linked to this one are listed below: |
August 13, 2024 at 6:25 am #16064481 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi. We try to keep one issue per ticket in our forum. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster. Therefore, I've split the other issue and created a new ticket with this issue. Best regards, |
August 14, 2024 at 6:09 pm #16072155 | |
patricG |
I've translated these 2 elementor templates but these don't work. Also, I translated the single product extra content which was added through the WordPress widget, but it also doesn't work. Could you check, please? New threads created by Osama Mersal and linked to this one are listed below: https://wpml.org/forums/topic/elementor-templates-translation/ |
August 15, 2024 at 7:31 am #16073181 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi. We try to keep one issue per ticket in our forum. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster. Therefore, I've split the other issue and created a new ticket with this issue. Best regards, |