getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[taxonomy] Original + translated tags on bilingual site on default language #425

Closed sebastian0119 closed 3 months ago

sebastian0119 commented 3 months ago

Hi there!

I am using the Typhoon theme with blog functionality, with two languages activated: Spanish (ES) as default language and English (EN) as second option.

So each post has currently two files in each directory:

spec.md
spec.en.md

where spec.md is the default file (in Spanish) and spec.en.md the translated file.

Each file has in its frontmatter something like this (extract):

When switching to English, the taxonomy list is "translated" correctly, means that it only filters the tags from all spec.en.md files.
See also the following image: image

However, when using Spanish as the default language, all tags are duplicated, meaning that the Spanish version + the English version are listed (e.g. diseño + design or planos + cds).
Another image: image

All the rest of translation is working well, the URL also always indicates which language is used (e.g. https://localhost:8000/es/blog/ or https://localhost:8000/en/blog/); it's just the tags.

And by the way, when being in the Spanish environment and clicking on a tag in English from the tag list (e.g. design), an empty list of posts comes up, whereas when clicking on "diseño" the correct list of posts is shown.

Any idea or suggestion is appreciated.

Grav v1.7.44 Taxonomylist v1.3.5

sebastian0119 commented 3 months ago

A quick afterthought: I seems that it has something to do with the cache.

When I am on the English version and clear the cache, then all tags are fine (English only). Switching to Spanish, tags for English + Spanish come up.

The other way around is exactly the same: when I am on Spanish and clear the cache + reload the page, all tags are fine (Spanish only) and when switching to English, both versions are shown.

Right now, where this problems occurs, I am on development settings:

cache:
  enabled: true
  check:
    method: file
sebastian0119 commented 3 months ago

Seems related to https://github.com/getgrav/grav-plugin-taxonomylist/issues/40

rhukster commented 3 months ago

Yes, this is a taxonomy specific issue, not an issue with Typhoon itself. I'll pick up the conversation on the taxonomy plugin issue.