[Warten auf das Feedback der Benutzer] Duplicate Queries
Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.
Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
-
8:00 – 13:00
9:00 – 13:00
9:00 – 13:00
8:00 – 12:00
8:00 – 12:00
-
-
14:00 – 17:00
14:00 – 18:00
14:00 – 18:00
13:00 – 17:00
13:00 – 17:00
-
Unterstützt die Zeitzone: Europe/Zagreb (GMT+01:00)
Hintergrund des Themas:
I am trying to identify why there are over 200 duplicate requests from WPML when using Query Monitor. The issue can be seen on this page: versteckter Link.
Die Symptome:
I see over 200 duplicate requests from WPML.
Fragen:
What is the reason for the duplicate requests?
How can it be fixed?
There are several possible causes for the duplicate WPML queries you are seeing in Query Monitor. For example, String Translation can generate multiple queries to fetch translated strings, increasing the query count. Also, certain themes or plugins, such as Elementor, WooCommerce, or ACF, may interact with WPML in a way that results in duplicate queries.
If object caching is disabled, WPML won’t store query results efficiently, leading to repeated database requests.
To help diagnose the issue further, could you check the queries under these conditions?
- **Only WPML plugins activated** – This will help determine if the duplicate queries are caused by an interaction with another plugin.
- **Theme set to a WordPress default like Twenty Twenty** – This will help identify if the issue is related to your theme’s compatibility with WPML.
Another thing, can you update WPML? We just released a new (major) version, can you check the number of queries after this?
What if you disable Adjust IDs for multilingual functionality option, what is the number of queries then?
Eliminating queries is not that simple as it typically comes from WPML core.
Can you please check the number of queries when:
- only WPML plugins are activated, as it will tell us if there is an interaction issue with other plugin
- theme is set to a WordPress default like Twenty Twenty as it will tell us if there is an interaction issue with your theme
I did not understand from your reply if you did such test?
before I disable "disable Adjust IDs for multilingual functionality option" - can you please tell me briefly what this function is for and what can happen if I deactivate it?
I will still carry out these tests. But first I would like to understand why these duplicate queries can occur in the first place? Is this normal or rather unusual?
I have also tested my site with the Code Profiler plugin. Here is the result. I find it frightening how high the plugin execution time of WPML is. As you can see, I have many other plugins on my site - but only WPML causes such high times. How can that be? What can be the reason that WMPL Multilangual CMS has such high times?
The "Adjust IDs for multilingual functionality" option in WPML ensures that content IDs (such as posts, pages, categories, and custom taxonomies) are correctly adjusted across different languages, allowing WPML to map and synchronize translated content with the original language version. It is particularly important when themes or plugins use hard-coded IDs or URLs instead of language-independent WordPress functions. WPML dynamically modifies queries to retrieve the correct content for each language, ensuring that translations are displayed correctly.
However, most modern themes follow best practices and don’t rely on hard-coded IDs, so this option is often unnecessary.
Duplicate queries can occur when WPML retrieves translations or content variations, which is normal to some extent, but excessive duplication may indicate configuration issues.
The high execution time of WPML is due to its resource-intensive language processing. This can happen with large datasets, complex queries, or compatibility issues with other plugins. Optimizing settings, caching, and database indexes can help improve performance.
That's why I suggest you carry out these tests, this may give us a better idea if this is about compatibility.