Skip Navigation

[Resolved] Don’t show empty terms with WPML

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

Problem:

In a Taxonomy view I am showing the "Examination Types" terms but have the "Don't show Empty Terms" box checked.

In EN language three terms have examinations in.
In the AU language only one term has examinations.

But when I display the taxonomy view, it displays all three terms for both languages. I would expect it to show 3 terms of EN but only one term for AU.

Solution:

It needs to disable option:
"Translatable - use translation if available or fallback to default language" in the WPML settings.

Relevant Documentation:

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by timE 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1413629

Tell us what you are trying to do?
I have a site using Toolset and WPML. I have a translatable post type called "Examinations" and a translatable taxonomy called "Examination Types".

In a Taxonomy view I am showing the "Examination Types" terms but have the "Don't show Empty Terms" box checked.

In EN language three terms have examinations in.
In the AU language only one term has examinations.

But when I display the taxonomy view, it displays all three terms for both languages. I would expect it to show 3 terms of EN but only one term for AU.

Is there any documentation that you are following?
I have looked for this problem but not seen it anywhere else. Can't find any reference to it on WPML support either.

What is the link to your site?
hidden link
hidden link

#1414573

Hello,

The problem you mentioned above is abnormal, I have tried it in my localhost with a fresh WordPress installation + the latest version of Toolset + WPML plugins, it works fine, please check these:
1) Make sure you are using the latest version of WPML plugins + Toolset plugins, you can download Toolset plugins here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP codes, and test again

3) If the problem still persists, please provide database dump file(ZIP file) of your website, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1415571

Thanks for the details, I have requested the access to your link, please grant it.

#1416017

I got the email and downloading the files, will update here if there is anything found.

#1417185

Hi Luo,

I think this issue is resolved now. The problem seems to be that I had only created the taxonomies in the languages where they were needed.
I had selected "Translatable - use translation if available or fallback to default language" in the settings.

I believe that where the translation didn't exist for e.g. the DE language, the view would fall back to the default UK language version of the term, find that it had items in it so display it, even though those items were from UK and not DE.

I've now created all taxonomies in all languages and switched "Translatable - only show translated items". The other languages are now no longer showing empty terms in the view.

I am still getting an empty term in the default language view but I'll close this ticket now and see if that becomes a problem for me later on.

Thanks for your help.