Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
After updating to WPML 4.7.4 and String Translation 3.3.3, issues arose with post categories not being recognized correctly on the front end when using Elementor. Disabling String Translation temporarily resolved the issue, indicating a compatibility problem between the updated versions of WPML, String Translation, and Elementor.
Solution:
We identified that the issue stems from Elementor using

term_taxonomy_id

instead of

term_id

, which our code did not anticipate, leading to all results being shown without filtering by a taxonomy term. A fix for this issue will be included in the upcoming WPML 4.7.5 release. Meanwhile, we provided a workaround involving a code modification in

/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/QueryFilter.php

. This modification should be tested on a staging site after taking a full backup. If this solution does not resolve your issue or seems outdated, please check for related known issues at https://wpml.org/known-issues/, verify you have the latest versions of themes and plugins, and if necessary, open a new support ticket 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.

Tagged: 

This topic contains 32 replies, has 1 voice.

Last updated by Andreas W. 2 months, 3 weeks ago.

Assisted by: Andreas W..

Author Posts
May 15, 2025 at 7:48 am #17035373

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you, I can connect to the Staging now if I change the login directory to /wp-admin.

Until now I can not confirm the issue on my test site.

See my test page here:
hidden link

I will need to investigate further on your staging site.

May 15, 2025 at 1:18 pm #17037043

azimd

We are also trying to check in your test site, but it will be great if you could also help us find out the issue in our staging site .. as we also tried deactivating all the other plugins, but still it doesn't work and the older version of the WPML is giving us some vurnability warning due to which our client is after us to update to the latest version but it is not working for us.

Forgot to tell you the admin URL is /apf-login

May 16, 2025 at 9:27 pm #17043562

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

What is happening, is that after closing Elementor, the Query Terms are not remaining saved.

I am sadly not yet able to confirm what is causing this issue.

term.jpg
May 17, 2025 at 10:06 pm #17044886

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am sadly still not able to replicate this issue on my test site, even after importing your homepage. There is no issue with saving the widgets.

Test page:
hidden link

On your site, for some reason, the widgets do not save their category setting in the query section.

Could you please give this a test by creating a completely new widget with a loop item template and category query on your site?

May 18, 2025 at 7:17 am #17045178

azimd

but why its not working on our staging site, please look into our staging site to identify the root cause, if i disable wpml string plugin, posts are loading as expected. also we have disabled all the plugin excepts elementor.

May 19, 2025 at 6:10 am #17046443

azimd

It would be really helpful if you could check on our staging server and let us know what the conflict is and how to resolve this situation. If we remove the string Translation plugin, it is working fine. With the string translation plugin, the term is having an issue on the Elementor loop carousel. It is showing fine in the edit page but it is not coming up on the UI.

May 20, 2025 at 12:59 pm #17052805

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies for the delay in answering, as I do not work on Mondays and Sundays.

I ran further troubleshooting steps and tests on the staging site today, but the issue persists.

I am about to take a copy of the site and if I do not find the cause for the issue today, I will be escalating to second-tier support.

May 20, 2025 at 1:44 pm #17053135

azimd

It would be greatly appreciated if you could help us debug the issue on our staging server. Additionally, if you could prioritize this task, that would be very helpful, as our client has flagged it as a significant concern. The current version of WPML installed on the production site is showing vulnerability warnings, which is why we’d like to upgrade to the latest version. You’re most welcome to take a backup and try to reproduce the issue on your end.

The main issue we’re facing is that a specific post category is not displaying in an Elementor loop on the frontend UI. However, the loop works correctly within the Elementor editor. Please do let us know if you need any details from our side. I have already given the FTP access as well as the WordPress admin details.

May 20, 2025 at 10:47 pm #17054735

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

It looks like I am not able to install plugins on your site. trying to upload Duplicator Pro leads to "Sorry, you have been blocked".

When trying to install "All In One WP Migration" from wordpress.org I get the message:
Installation failed: Download failed. Not Found

If this is somehow controlled by your security plugin, please make sure that my user account has unrestricted access.

Or, could you please make sure to install the free plugin "All In One WP Migration" and leave me a comment once you are done with this task?

In doubt, please ask your hosting support team if they are blocking this plugin.

May 21, 2025 at 6:36 am #17055200

azimd

I think our Cloudflare setup is blocking the installation directly with the upload.

I can see that the "All-in-One WP Migration and Backup" version 7.94 plugin has already been installed but is inactive state. Do let me know if you are looking for anything else

May 21, 2025 at 1:41 pm #17057866

azimd

Could you please check this on priority and let us know, as it is very urgent and we are not able to figure out why this issue is happening? We have installed the All-in-One WP migration full version.

Today, when we check the post category it is not showing even in the Elementor editor now, have you guys done any changes to check? If we deactivate the WPML, the post category starts working.

May 22, 2025 at 6:42 am #17059636

azimd

Hi Andreas,

Could you please let us know if there are any updates on this issue?

If we use the previous version of the WPML then everything works fine in that state.
Our production site is running on the previous version of WPML and is working fine.

However, we’re currently unable to use the latest WPML version due to the ongoing issue, and our Hostinger server is flagging the older version as vulnerable.

We’d really appreciate your help in resolving this as soon as possible.

May 22, 2025 at 12:14 pm #17061484

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

WPML 4.7.5 which is possibly being released next week will receive a fix for:

- Elementor: Fixed translating terms for the loop query which uses term_taxonomy_id, not term_id

This should solve the problem.

I am not sure why I was not yet able to recreate the issue on a new test site, but I would kindly like to ask you to wait for the update and then test again.

This ticket will remain open for 14 days.

May 22, 2025 at 1:28 pm #17062061

azimd

Hi Andreas,

We did some investigation while you were away and wanted to share our findings. I’ve attached two screenshots — one showing the query when the String Translation plugin is enabled, and the other when it’s disabled.

For some reason, the [tax_query] element is missing from the query array when the String Translation plugin is active.

Additionally, we’re now able to filter posts using the query ID, but not by category name. Strangely, the category filter is not being included in the main query when the plugin is enabled. We’re currently applying the category filter using the query ID, but only after the main query has been fired — which isn’t ideal.

Additionally during our debug, we found that in the file class-wpml-term-query-filter.php located at

sitepress-multilingual-cms/classes/query-filtering

in the function get_terms_args_filter the below code is retruing 0 which we think should not be 0

if ( 0 === count( array_filter( (array) $taxonomies, array( $this->taxonomy_state, 'is_translated_taxonomy' ) ) ) ) {
return $args;
}

We hope this helps narrow down the issue. Looking forward to your guidance on how to proceed.

Here are the query parameters:

query parameters when string translation plugin is enabled:

Array ( [posts_per_page] => 6 [paged] => 1 [has_custom_pagination] => [post_status] => publish [post_type] => post [orderby] => post_date [order] => desc [ignore_sticky_posts] => [date_query] => Array ( ) )

query parameters when string translation plugin is disabled:

Array ( [posts_per_page] => 6 [paged] => 1 [has_custom_pagination] => [post_status] => publish [post_type] => post [orderby] => post_date [order] => desc [ignore_sticky_posts] => [tax_query] => Array ( [0] => Array ( [taxonomy] => category [field] => term_taxonomy_id [terms] => Array ( [0] => 446 ) ) ) [date_query] => Array ( ) )

with string translation plugin - disabled.png
with string translation plugin - enabled.png
May 22, 2025 at 1:36 pm #17062133

azimd

Are you sure this will be resolved in your next release in WPML 4.7.5?
- Elementor: Fixed translating terms for the loop query, which uses term_taxonomy_id, not term_id

Have any other users reported similar issues to us? What is the fix that is coming in the next release?

Can you please share our findings with your Engineer so that they will be able to get some idea of what issue we are facing and confirm if this will be fixed in the next release? We have also been continuously trying to fix the same for some time, and finally, we found this issue. Would really appreciate it if you could check and confirm, as this is very much important for our client to get this fixed at the earliest.