This thread is resolved. Here is a description of the problem and solution.
Problem:
WooCommerce My account/registration page layout was broken for translation.
Solution:
Make sure all strings for WooCommerce specially for the strings used in login/signup are translated properly from WPML -> String Translation. Most probably some string like "text %s" is missing the text specifier "%s" for the translation, which was exactly the case in this thread.
Relevant Documentation:
N/A
100% of people find this useful.
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: Not WPML issue
This topic contains 8 replies, has 2 voices.
Last updated by bertrandG-11 1 year, 6 months ago.
Assisted by: Subash Chandra Poudel.
Author | Posts |
---|---|
July 22, 2023 at 7:03 am #14082679 | |
bertrandG-11 |
I am trying to: display the user registration page in the site's second language, but when I switch from English to French, the page display changes, and when I revert to the default language, it returns to normal. Link to a page where the issue can be seen: hidden link I expected to see: hidden link Instead, I got: Once the page is translated from English (default language) to French (second language), the display changes, it resizes. I have already tested this on the original template, deactivated the cache plugin, login plugin, and recreated the page. The problem still persists. |
July 24, 2023 at 4:22 pm #14091443 | |
Subash Chandra Poudel |
Hi there, I see that the translated page returns a 500 HTTP status and returns only a partial HTML page which is rendered incorrectly by the browser. If you check the end of the HTML source of the page you can see there is a critical error on the site. Can you please enabled WordPress debug mode as explained in the next links and see if the error log points to some plugin or code causing the issue? Then deactivate that plugin/code to see if it helps. https://wpml.org/documentation/support/debugging-wpml/ If you need further help or the error comes from WPML can you please share the fill error details here for me to check the issue further? Regards, |
July 24, 2023 at 5:07 pm #14091677 | |
bertrandG-11 |
During my investigation, I noticed that when I deactivate WPLM STRING TRANSLATION, everything works, although I no longer have the translations. Here's what the log file gives me: [24-Jul-2023 17:01:00 UTC] PHP Deprecated: Automatic conversion of false to array is deprecated in /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/wpml-sticky-links/classes/class-wpml-sticky-links.php on line 19 [24-Jul-2023 17:01:00 UTC] PHP Deprecated: Implicit conversion from float 1.0E+34 to int loses precision in /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/class-wp-hook.php on line 77 [24-Jul-2023 17:01:00 UTC] PHP Deprecated: Implicit conversion from float 1.0E+34 to int loses precision in /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/class-wp-hook.php on line 79 [24-Jul-2023 17:01:02 UTC] PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Helpers/Text.php:62 Stack trace: #0 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Helpers/Text.php(62): sprintf() #1 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Helpers/Text.php(81): Rtcl\Helpers\Text::get_default_registration_privacy_policy_text() #2 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Traits/Functions/UtilityTrait.php(420): Rtcl\Helpers\Text::get_privacy_policy_text() #3 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Controllers/Hooks/TemplateHooks.php(1449): Rtcl\Helpers\Functions::privacy_policy_text() #4 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/class-wp-hook.php(308): Rtcl\Controllers\Hooks\TemplateHooks::registration_privacy_policy() #5 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #6 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/templates/myaccount/form-login.php(128): do_action() #8 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Helpers/Functions.php(2810): include('/homepages/8/d9...') #9 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Shortcodes/MyAccount.php(56): Rtcl\Helpers\Functions::get_template() #10 [internal function]: Rtcl\Shortcodes\MyAccount::output() #11 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Controllers/Shortcodes.php(49): call_user_func() #12 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Controllers/Shortcodes.php(65): Rtcl\Controllers\Shortcodes::shortcode_wrapper() #13 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/shortcodes.php(355): Rtcl\Controllers\Shortcodes::my_account() #14 [internal function]: do_shortcode_tag() #15 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/shortcodes.php(227): preg_replace_callback() #16 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/class-wp-hook.php(308): do_shortcode() #17 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/plugin.php(205): WP_Hook->apply_filters() #18 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/post-template.php(255): apply_filters() #19 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/themes/classima/classified-listing/custom/listing-account-content.php(16): the_content() #20 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/themes/classima/inc/helper.php(266): require('/homepages/8/d9...') #21 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/themes/classima/inc/helper.php(272): radiustheme\Classima\Helper::get_template_part() #22 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/themes/classima/classified-listing/custom/listing-account.php(38): radiustheme\Classima\Helper::get_custom_listing_template() #23 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-includes/template-loader.php(106): include('/homepages/8/d9...') #24 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-blog-header.php(19): require_once('/homepages/8/d9...') #25 /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/index.php(17): require('/homepages/8/d9...') #26 {main} thrown in /homepages/8/d916931045/htdocs/TrEE_BWatO0_singLe-Site/GHanA/wp-content/plugins/classified-listing/app/Helpers/Text.php on line 62 |
July 25, 2023 at 8:32 am #14093847 | |
Subash Chandra Poudel |
Thank you for the details, The error seems to be coming from "classified-listing" plugin. Most probably it is being caused due to some error in the plugin or some erroneous string translation at WPML -> String Translation. Will it be possible for you to setup a staging/test site where we can test the issue without affecting the live site and risking data loss? If yes, can you please test the following and see how it goes: - Deactivate all plugins except WPML plugins, activate a default them like twenty twenty three and see if the issue is still there or not. - If the issue is not there, activate the plugin "classified-listing" and see if the issue is there now now or not. - Also, go over the translations at WPML -> String translation and see if you can spot some translation issue there. ( like some missing parameters like %s for translation ). If this does not helps, I would need to take a closer look at your site. So would you please mind sharing temporary access (WP-Admin and FTP) to your staging site? I have enabled a private reply for you to share the credentials securely, which means only you and I have access to it. IMPORTANT: Please take a complete backup of the site first to avoid data loss. ✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you don't have a staging site or deactivating plugins/theme on the site is not possible please provide a copy of the site as explained in the next link: https://wpml.org/faq/provide-supporters-copy-site/ Regards, |
July 25, 2023 at 5:19 pm #14098489 | |
Subash Chandra Poudel |
Thank you for the details. The FTP details are working but wp-admin credentisl does not seem to work I get following error when trying to login: ERROR: Invalid username. Lost your password? Can you please recheck or re-send working admin details again? |
July 27, 2023 at 10:20 am #14109537 | |
Subash Chandra Poudel |
Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our %s.Login works now thank you for that! After further troubleshooting I found there was an issue with a translation of a string that was causing the issue. I fixed the translation and it seems to work on the staging site. Can you please try the following on the live site and see if it helps there as well: - Go to WPML -> String Translation and search for "Your personal data will be used to" - Edit the translation for the third string Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our %s as shown on the screenshot. Or edit all translation of similar text and confirm as following. - Notice the current translation of the text is: Vos données personnelles seront utilisées pour faciliter votre expérience sur ce site web, pour gérer l'accès à votre compte et pour d'autres raisons décrites dans nos %. Notice the missing "s" at the end for %s change it to: Vos données personnelles seront utilisées pour faciliter votre expérience sur ce site web, pour gérer l'accès à votre compte et pour d'autres raisons décrites dans nos %s. |
July 27, 2023 at 2:43 pm #14111801 | |
bertrandG-11 |
Hello, However, I'm still stuck on the woocommerce page. When I add a product to the shopping cart, when I get to the "hidden link" page, I don't have any products. Thank you in advance for your help. |
July 27, 2023 at 5:37 pm #14112853 | |
Subash Chandra Poudel |
Hi there, Thank you for confirming the original issue reported in this ticket is resolved now. Please note we try to limit tickets to only one issue so as to keep better track of issues. Regarding the issue, with Products and Cart I checked and I see there are no products at hidden link . Can you please add a test product, translate it and see if adding to cart works fine? If not, feel free to mark this ticket as resolved ( as the original issue is resolved now) and open a new ticket for the new issue. The following document on WCML might help you: https://wpml.org/documentation/related-projects/woocommerce-multilingual/ |
July 28, 2023 at 11:23 am #14116639 | |
bertrandG-11 |
Many thanks for your guidance once again. |
July 28, 2023 at 11:26 am #14116723 | |
bertrandG-11 |
Many thanks for your guidance once again. |