Background of the issue:
I am trying to use the language switcher on our website, and it's showing non-published translations. The issue can be seen on this page: versteckter Link. The hreflang links are also affected, as shown in the code: .
Symptoms:
The language switcher is showing non-published translations, leading to 404 errors. I see links like versteckter Link in the source code that creates 404 errors.
Questions:
Why is the language switcher showing non-published translations?
How can I hide unpublished post translations to prevent 404 errors?