This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with menus not being translated despite having full translations set up, and after enabling "adjust IDs for multilanguage compatibility", you find that getting the master ID of a product doesn't work, and links of translated products lead to a "too many redirections" loop. Solution: 1. Change the permalink for the product base to the default one, which should display the products correctly in the secondary language. 2. Check the string translation for errors. The translation for links should only include the path, not the full URL. 3. If you're using Rank Math SEO, there might be a known compatibility issue causing the redirection problem. Please refer to the errata page for more details. To resolve this, make a full backup of your site and then add the following code to your theme's functions.php file:
This past week I was having a problem with menu's not getting translated into different languages although they did have full translations set up. In the end the supported fixed this by enabling "adjust ID's for multilanguage compatablility". Now however, getting the master ID product a product ID doens't work anymore, also, links of translated products don't work anymore, they end up in a "too many redirections" loop
Languages: English (English )French (Français )Arabic (العربية )
Timezone: Pacific/Easter (GMT-05:00)
Hey again,
Even duplicator didn't work for me (locally), could you please give us access to write in that folder or simply save a backup (without media folder) with WP all in one migration, I can then download it,
I hope I understood what you meant, you couldn't create / download a backup from duplicator? or you couldn't get the wp installation to work locally? I checked and zipped this duplicator pro backup, you should be able to download it from here:
Languages: English (English )French (Français )Arabic (العربية )
Timezone: Pacific/Easter (GMT-05:00)
So here are my findings so far :
1- When you change the permalink for the product base to the default one, the products will show correctly in French :
- hidden link
2- The link that it redirects to seems to be related to a wrong translation of your links, for example I found this in string translation :
- hidden link
The translation for that string shouldn't be the full link, but only the link part "/frequently-asked-questions/" , this is not the concerned string as I'm still trying to find which link is not correctly translated because your Woocommerce URLs seems to be trnaslated correctly
Great! That does seem to fix the problem for the French products 🙂 is there a way to remove the url's from the string translations? Not sure how that happend.
If I'm correct, then the duplicate products don't get all properties of the original copied, so for instance not all meta data. So I want to get the original product ID and do checks on that product. I should be able to to do the following in my functions.php yet, it consistantly doesn't work.
[PHP in functions.php within a loop using global $product]
Thanks for your help! Much appreciated! 🙂 I'm going to continue working on the site of the site, hopefully all will work as expected now. If I find another problem, you'll probably hear back from me O:)
Thanks again 🙂
P.S. You can ignore my post #15175574 naturally that won't work if I insert " <br>" into the ID string :p However I couldn't get "wpml_master_post_from_duplicate" to work, not even if called as intended. But $master = apply_filters( 'wpml_object_id', $product->get_id(), 'product', true, 'nl'); does get the master ID, so I'll just use that 🙂