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 9 replies, has 2 voices.
Last updated by harijsK 1 year, 7 months ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
October 8, 2023 at 9:18 am #14534153 | |
harijsK |
I am trying to:Have woocommerce translated product slugs auto-generated from title Link to a page where the issue can be seen: hidden link I expected to see: The product slug should be generated from product title "trial item for translation" Instead, I got: but instead the slug is translated from default language - hidden link Default language is LV. The products are translated using automatic translation. hidden link - settings page. |
October 9, 2023 at 10:24 am #14538315 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I understand the issue you're having and will try my best to assist you in this matter. If the Page URL option is set to "Auto-generate from Title", then the field to add the translation for slug shouldn't appear in the editor. Maybe you need to retranslate the page again so that the slug is taken from the page title. Please follow the steps mentioned below. - Please clear the caches properly from the site. I hope it will help to solve the issue. But, feel free to let me know if you need further assistance. I will be happy to help. Best regards, |
October 9, 2023 at 4:22 pm #14541645 | |
harijsK |
Hello, |
October 10, 2023 at 5:40 am #14544115 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, As the issue persists, a closer inspection will be required to understand the root cause of the issue. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it. Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you. IMPORTANT Looking forward to your response. Best Regards, |
October 11, 2023 at 5:11 am #14555015 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I thoroughly have checked and understand the issue. If you check closely, you'll see that the title contains some "macron" characters(such as ē, ģ, and ā) but, the slug doesn't have those characters(Screenshot: hidden link). For your information, The dots, accents, and other non-standard characters will be automatically removed from native slugs, when the post is saved or updated. When macrons are converted to general words, the meaning of the word changes. This is why the translation in the ATE differs. Please refer to the example below for further clarity. I have used Google Translator to translate the sentence. Translation of 'izmēģinājuma prece tulkošanai mainits'(contain macron characters) is : 'trial item mentioned for translation' [Screenshot: hidden link; Translation of 'izmeginajuma-prece-tulkosanai-mainits'(Macrons are removed as per the default rule of WordPress for slugs): 'translation-item-for-translation-changed'[Screenshot: hidden link; I hope you can understand what causes the discrepancy. If you'd like the slug to match the title, simply copy the title's translation and paste it into the slug translation field. Given that WordPress doesn't support non-standard characters in its native slugs, this is the current workaround for translating slugs that contain special characters. I hope I'm able to clear things for you. But, feel free to let me know if you need any further assistance. I will be happy to help. Best regards, |
October 11, 2023 at 11:44 am #14558943 | |
harijsK |
Hello, I understand your explanation, but do I understand correctly that if I have set Page URL setting to Auto generate from title ( hidden link ), then I shouldnt even have the translation option. It should create the page url slug from the title instead of trying to translate the original slug. I understand that your explanation should be if I would have set "Page URL" to "Translate" |
October 12, 2023 at 6:57 am #14562921 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, You're correct! However, I forgot to mention in my earlier response that the setting in WPML for Page URL creation does not have any effect on the product translation. It is configured within WooCommerce Multilingual. You'll always see the field in the translation editor when you're translating products and if automatic translation is enabled, that slug will be translated accordingly. I hope you can understand. For now, you need to adjust the slug from the translation editor as per your needs. Sorry for any inconvenience that may cause due to not informing you earlier. If there is anything else you need help with, please let me know. I will be happy to help. Best regards, |
October 12, 2023 at 7:15 am #14563105 | |
harijsK |
So how can I set the page URL to be generated from title for my woocoommerce products? Because curently I have set it to that in settings - hidden link , but it doesnt work. hidden link For this product you can see that title is "trial item" and slug should be generated from it, but actually it is slag-item (translated) |
October 13, 2023 at 5:46 am #14569779 | |
Prosenjit Barman WPML Supporter since 03/2023
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I totally can understand the current scenario. As I mentioned in my previous message, the Page URL configuration doesn't have any effect on the WooCommerce Product. The slug of the product will always appear in the translation editor as it is configured within the WooCommerce Multilingual. If the automatic translation is enabled, the slug will be translated along with the other fields. I hope you can understand. To use the title as the slug for the product, simply copy the translated title and insert it into the slug translation section within the Translation Editor. For a better understanding, please check this video: hidden link Please let me know if there's anything else I can assist you with. Best regards, |
October 13, 2023 at 6:24 am #14569843 | |
harijsK |
Ok, now I understand that the Page URL for some reason doesnt take effect for wooocommerce products. |
October 13, 2023 at 6:40 am #14569901 | |
harijsK |
I found the above bug description says that the option should also be working for woocommerce products and not how you described it, saying that the bug I encountered is not a bug. I applied the temporary fix and it fixed it. This issue was reported for version 5.1.2. I already have 5.2.1 and it is not fixed in the plugin :/ |