This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported issues with duplicate queries and missing translations in a multilingual WordPress setup using WPML and WooCommerce Multilingual (WCML). They also inquired about setting up a fallback option for untranslated products and categories. Solution: 1. We recommended deactivating WPML and WCML to check if the duplicate queries persist. After running WPML troubleshooting actions from WPML->Support->Troubleshooting, we identified that the remaining queries were not related to WPML. 2. For the fallback option, it can be enabled from WPML->Settings->Post Types Translation -> Translatable use translation if available or fallback to default language. We provided a link to our documentation for further guidance: documentation. 3. To address the issue of missing translations for product categories, we suggested setting certain taxonomies to "Translatable - only show translated items" from WPML -> Settings -> Taxonomies Translation.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Additionally, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, you can also visit our support forum at WPML support forum.
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.
I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)
**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.
NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.
Great, I have completed the STATUS requirements, except 3 points:
1.) Products Missing Translations: We do not need some products for other languages at this moment. Can you please confirm that we have the fallback to english configured properly?
2.) WPML Media is not active: Not Needed
3.) Taxonomies Missing Translations: I translated all here, and the notice still had a count to translate. So to combat this, I actually removed all translations on my categories. You can see now that there are simply 19 categories in ENGLISH only here: hidden link
However at Status: hidden link
You will see "26 Product categories are missing translations". Where are these 7 invisible categories coming from?
As of now the Duplicate Queries has fallen to 48 from the original 66; so we are making headway (27.3% resolved)
A quick note about setting up the fallback option for missing product translations: while this feature is great, please keep in mind that it can sometimes impact performance.
Regarding the remaining duplicate queries seen in Query Monitor, I've noticed there are now only 6, which do not seem related to WPML. Please verify this with me. I'm checking the queries while in the dashboard.
The only locations with high WPML-related queries currently are the WPML Translation Management Dashboard and the WCML Translation Dashboard. This is expected since we run queries per item to gather information about them.
I will verify this behavior with our team and update you.
1.) FallBack Option. How is this enabled? Please share direct location for reference. What is the option that is best for performance? Would that just be a redirect to some page? How is that enabled?
2.) I am checking the queries while accessing "hidden link" and receiving 48 from the original 66
3.) Does not seem answered from my original reply. Can you please take another look at this and explain why I am receiving "26 Product categories are missing translations."
1 - You can enable this from WPML->Settings->Post Types Translation -> Translatable
use translation if available or fallback to default language
When reviewing it looks like you have enabled this option at the moment for Categories (block_categories) and a few other taxonomies.
Review this documentation for more information on the feature and how it works.
Performance-wise, yes it will require more out of your environment but if there is no noticeable performance issue then it should be OK. In most cases, you wont notice a difference, this usually can affect sites with many languages
2- I see. Most of the queries are not related to WPML, however, the ones that are come from
This is related to the "..fallback to default language" feature.
You can resolve these issues by going to WPML -> Settings -> Taxonomies Translation and switching the following taxonomies to "Translatable - only show translated items."
However, I performed a quick loading time test, and there doesn't seem to be any major performance issue caused by them.
Taxonomies:
Themes (wp_theme)
Template Part Areas (wp_template_part_area)
Categories (block_categories)
I have also discussed the queries we see in the WPML Translation Management and WCML dashboard with our team who assured me that these are expected as we are filtering through different product ids and pages/posts.
3 - If possible, let's resolve the queries issue first, and or if it is resolved based on my above information, we can split this into it's own ticket. I took a look and it will require further debugging. There are 19 categories and the status page is showing more, however, I suspect this might be the counter that is off and not something that is affecting the way the site or WPML works.
1.) I have adjusted some of the required assets to: "Translatable
use translation if available or fallback to default language" as this functionality seems to make the most sense for our purpose.
2.) None of my options within "Taxonomies Translation" are set to "use translation if available or fallback to default language"?
3.) The counter being off is a problem, and applicable to WPML. Please feel free to create a new ticket, as I would like it resolved (hence me incorporating it in the ticket)
New threads created by Bobby and linked to this one are listed below:
The following 3 items are now set to Translatable
only show translated items, before that they were set to Translatable
use translation if available or fallback to default language
Themes (wp_theme)
Template Part Areas (wp_template_part_area)
Categories (block_categories)
Based on my previous feedback regarding the duplicate queries, do you still have any questions if not we can mark this ticket as closed as I do not see something out of the ordinary.
Regarding #3 I will split this into it's own ticket.