This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was experiencing issues with product variations not displaying correctly on the Danish version of their WooCommerce site. The variations would either not show up or become inconsistent upon page refresh. The problem seemed to be related to a plugin conflict and the use of special characters in attribute names.
Solution:
1. We recommended deactivating all plugins except for WooCommerce, WooCommerce Multilingual, and WPML-related plugins to identify a plugin conflict. Upon reactivating plugins one by one, we found that the 'Matting Webshop' plugin was causing the issue.
2. We suggested reviewing the code of the 'Matting Webshop' plugin or contacting the plugin developer for further assistance.
3. For products with only one variation showing, we advised deleting the Danish translation of the product (ensuring it's also cleared from the Trash) and then re-translating the original product into Danish.
4. We noticed that the attribute 'Svart' was added twice and recommended setting up variations for both attributes and updating the translation.
5. We enabled 'Language filtering for AJAX operations' in WPML > Languages, set the translation preference for fields starting with 'attribute_' to 'Translate' in WPML > Settings > Custom Field Translation, and updated the translation after adjusting the default product's attributes and variations.
6. We identified that using a slash ('/') in attribute names caused issues and recommended replacing it with a different character, such as a pipe ('|'), before re-translating the product into Danish.
If you're experiencing similar issues, we recommend trying the steps above. However, the solution might be irrelevant due to being outdated or not applicable to your case. If these steps do not resolve your issue, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to 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: WCML
Related documentation:
This topic contains 21 replies, has 3 voices.
Last updated by petterH 1 year, 1 month ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
February 5, 2024 at 11:40 am #15265722 | |
petterH |
Tell us what you are trying to do? On some products the variations are not shown when Danish is selected. Swedish (original) and English work fine. The old issue was that a grey box appeared with a message that no combination existed. Now the dropdown boxes appear, but there are no options in them. If I de-activate Woocommerce Multilingual, then the variants appear. But with that de-activated it is not possible to edit the extra fields for variations we have added. We are open to all kinds of solutions. If it would be possible to handle the products as individual products that would be fine now that the translations are in place. But of course it would be great if it just worked as it is supposed to. What is the link to your site? |
February 5, 2024 at 3:31 pm #15267084 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-04:00) |
Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly. Please be sure to make a full backup of your site and database. Then, go to WPML -> Support -> Troubleshooting. Look for 'Clean up' and click the following: After these steps, do you see the variations in the drop downs on the frontend for all languages? |
February 5, 2024 at 3:53 pm #15267228 | |
petterH |
Hi Lauren, Just tried all the steps but it still looks the same unfortunately... |
February 6, 2024 at 11:19 am #15270957 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, Thank you for trying out the suggestions. It seems the variations on your site have been created from the Custom Attributes(Attributes that are created directly from the Product Editor instead of going to the "Products > Attributes" section. ). Although it is possible to translate the custom attributes and display them properly, we always recommend creating the Attributes and Terms from the Products > Attribute section, assigning the Attribute to the product, and creating variations from the Attribute terms. For now, please try the following steps as these often help resolve problems in translated products with variations that are created from Custom Attributes. - Please open the default Product in the WordPress editor. Once done, you can Synchronize the "Product" and "variation" again by going to "WPML > Support > Troubleshooting"(Screenshot: hidden link), and hopefully, that will help in solving the issue. Let me know how it goes. I will be happy to help if you need further assistance in this matter. Best regards, |
February 6, 2024 at 1:26 pm #15271983 | |
petterH |
Hi, It worked! But when I tried to change back to the correct spelling on the attributes it was the same again. However, if I left the changed attribute unselected in the variations tab on the original language and updated the translation, it worked as it was supposed to. But after synchronizing it did not work on the rest of the products that had conflicts. It might work if I do the same procedure manually on all affected products. Or what do you think? |
February 7, 2024 at 4:41 am #15274287 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi There, It's great to hear that the provided steps were effective this time! If the Variations are not appearing after you've updated the term, it could be due to the Term not being saved correctly, or perhaps the variation that is created from the term hasn't been configured accurately. Since you are working with a custom attribute, following the steps I outlined in my last message should help in addressing this matter, as this approach has yielded positive results in several cases. It's worth noting that such variation issues should not be widespread across all products unless the WooCommerce Multilingual plugin was installed after the translations were created. Should this problem recur with other products, please apply the same steps. I hope that this method will also help in solving the issue in other products. Please let me know if that helps or if you need further assistance in this matter. I will be happy to help. Best regards, |
February 7, 2024 at 8:18 am #15274931 | |
petterH |
Thanks. There are however a lot of products with similar issues, for instance this one: hidden link where only a few variations are listed on Danish and changing does not trigger a change. I tried the method on this product unsuccessfully. There must have been something going on when the products were translated to Danish. The English works perfectly. Would it be possible to start over with the Danish? We did automatic translation via Deepl and are happy with the translations themselves. But not so happy about the lack of functionality on the Danish site... |
February 8, 2024 at 4:26 am #15279551 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, As the variations are still not working as per your expectations, I would be happy to take a closer look and suggest to you what to do next. 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, |
February 9, 2024 at 5:50 am #15283983 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, In order to translate the WooCommerce Products, it is required to keep the WooCommerce Multilingual plugin active on the site. Otherwise, the variations won't be copied to the translated products. However, in cases where product variations are created from custom attributes, issues with the variations on translated products are often resolved by synchronizing the Products and Variations through WPML > Support > Troubleshooting. However, this approach doesn't seem to be effective in this case. Despite trying the potential solutions, the problem persists, suggesting a possible conflict with plugins. I've identified two plugins that extend variation features, which could also be contributing to the issue. Given that the site is live, I haven't performed a plugin conflict test. With your consent, I'm willing to conduct this test, which might help identify the root cause. Depending on the outcome, I can advise on the next steps. If the test doesn't resolve the issue, I'll create a copy of your site for further investigation and possibly escalate the matter to our second-tier support team. I also observed that changing variations in Danish doesn't trigger expected updates, such as image changes. A WooCommerce endpoint 'wc-ajax=wc_additional_variation_images_get_images' seems to load only once in Danish, unlike in other languages where it reloads with each variation change to display new images. This could indicate that the endpoint is blocked in Danish, preventing image updates. A plugin conflict test might also shed light on this issue. I await your permission to proceed with these tests. Meanwhile, for the Danish translations, if you want to retranslate the products into Danish language, instead of deleting all Danish translations, try removing just one (ensuring it's also deleted from 'Trash'), then please retranslate the default product into Danish. If it solves the issue you're having, you can then retranslate the remaining products. Please note, the translations you've made for Danish are stored in the Translation Memory. If you use automatic translation, credits will be deducted only for texts that haven't been previously translated. I hope you can understand. Looking forward to your response and I'm always here to help. Best regards, |
February 9, 2024 at 9:27 am #15284635 | |
petterH |
Hi, Sounds good, you have permission to test for plugin conflicts on the live site. It would be great if we could find a solution. I will try re-translating to see if it works. You mean that I remove a product when Danish is selected and then add translation from the original language? |
February 11, 2024 at 4:13 am #15289161 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, After deactivating all plugins except for WooCommerce, WooCommerce Multilingual, WooCommerce Additional Variation Images, WooCommerce Custom Fields for Variations by Iconic, WPML, and String Translation, I noticed that the product images on this product(hidden link) began to change with different variations, which was not happening before as I previously mentioned. This indicates a plugin conflict was preventing the images from updating on Danish product pages. However, when I started to activate the plugins to see which one was causing the issue, the issue reappeared immediately upon reactivating the 'Matting Webshop' plugin. Interestingly, this problem seems to be isolated to this specific product; other products update their images correctly when variations are selected. I would like to kindly ask for a review of the 'Matting Webshop' plugin code to see if there are any specific configurations for this type of product that might be causing the issue. You can also reach out to the plugin developer for further assistance in this matter. Kindly be informed that providing support for the issues that happened due to the custom plugins or themes falls outside our standard support scope. But, I am more than willing to guide within our capabilities. While checking the other Danish product, I found another product (hidden link) where only one variation was showing. I tried synchronizing the product, attribute and variation from both WPML and WooCommerce Multilingual but that product continues to display one variation. However, when I deleted that Danish product and retranslated the default product into Danish(ensuring the settings shown in this screenshot (hidden link) were applied), all the variations started to display correctly in translated version. This suggests that the problem could have been due to incorrect storage of variation values in the database or an issue linking the translated variations to the translated product backend. Please proceed by removing the Danish translation of the product, ensuring it's also cleared from the Trash, and then re-translate the original product into Danish. I hope this will help. Let me know the update. I'll be more than happy to help if you need further assistance in this matter. Best regards, |
February 14, 2024 at 8:32 am #15300461 | |
petterH |
Hi, and thanks for your help! |
February 14, 2024 at 3:05 pm #15303163 | |
petterH |
Now I have had a meeting with the client and there are still some issues that are really strange... On one of the products (hidden link) the variants were shown correctly for the first reload of the Danish product. This was a very odd behavior. I wonder if you could re-create it by removing and re-translating and try to find out what is going on. The plugin that you found to be causing the conflict earlier is de-activated now and it can stay so. So I hope this is now a standard setup for variants in Woocommerce with WPML. |
February 15, 2024 at 7:55 am #15305319 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, If the variation issue is limited to specific Danish products, there's no need to remove all products. Instead, you can delete just the problematic Danish product(s)[from the Trash as well] and retranslate. However, if you're comfortable with deleting all and starting the translation afresh, you can take that approach as well. Regarding the problem where variations disappear after reloading - I reviewed the default product and noticed that "Svart" is added twice in the attributes (Screenshot: hidden link). However, I noticed that variations have been created for one of the attributes only. Once I set up variations for the other attribute terms and updated the translation, the issue was resolved, and the variations remained visible even after several page refreshes. Please check now and let me know if you need further assistance in this matter. I will be happy to help. Best regards, |
February 15, 2024 at 8:24 am #15305442 | |
petterH |
Hi, Well spotted about the duplicate attribute! However, I just tried removing the attribute and the extra variants on the original product and deleted the Danish and re-translated it. But then the same thing happened again, it showed up fine and then I refreshed and only one was available and the image does not update when that variation is selected... When I look at the variants on the Danish product it seems like the top variant did not connect to the right attribute but the bottom one is... |