Skip Navigation

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

Problem:
The client is experiencing an issue with Jet Engine listings where the listing grid is mixing languages. When clicking on a Dutch version of a listing, it redirects to the English version. The issue is also observed with slugs, where the Dutch version uses the postname and the English version uses the post ID.

Solution:
We have identified that the problem is due to the current Custom Query used for listing the posts. The query is incorrectly assuming that the

term_taxonomy_id

and

term_id

in the term relationships and terms table always match, which is not the case and can lead to fetching incorrect values and retrieving the wrong language.

To resolve this, we recommend adjusting the query so that it does not solely rely on

terms.term_id

for fetching values.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the issue persists, 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. If you still need assistance, please 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: 

This topic contains 4 replies, has 2 voices.

Last updated by Bigul 8 months ago.

Assisted by: Bigul.

Author Posts
April 22, 2024 at 3:36 pm

Jasper

I am having trouble with Jet engine listings. This is what I am looking at:

hidden link

If you are looking at this screen you see the listing grid is mixing languages.

But! If you click on a Dutch version you are directed to the English version?!?
If you look at the slugs the slugstypes are different. One is using the post ID, the Dutch version is using the postname.

If you look at: hidden link

The language seems correct but then if you click the tile. It goes to the English version.

April 22, 2024 at 4:51 pm
April 23, 2024 at 1:09 pm #15556177

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

The issue exists after the initial checks, so we are consulting with our team for an expert opinion. We will get back to you soon. Please wait.

--
Thanks!

Bigul

April 24, 2024 at 7:46 am #15559056

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Our team has updated this bug is happening because of the current Custom Query you are using for listing the posts. So please adjust your query according to the following advice.

Now you are checking the relationship between two tables, specifically the term_taxonomy_id and term_id in the term relationships and terms table. It assumes that these two IDs always match, which isn't always true. This could lead to incorrect values being fetched, which might result in the wrong language being retrieved.

To fix this flaw please adjust the query. So that it doesn't solely rely on terms.term_id for fetching values.

--
Thanks!

Bigul

April 24, 2024 at 2:57 pm #15561431

Jasper

Hi Bigul,

That sounds that the whole functionality of my site will basically will stop working. I need the queries to work this way. I will check with Crocoblock if they might be able to provide me with a solution based on your answers.

I will get back to you when I know more.

April 24, 2024 at 5:06 pm #15562077

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. Take your time. We will wait for your feedback.

--
Thanks!

Bigul