integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Hidden languages are listed in fallback translation text

Open timobrembeck opened this issue 2 years ago • 0 comments

Describe the Bug

The fallback text for missing page translations also lists existing public translations in languages which are disabled/hidden.

Steps to Reproduce

  1. Create a page which has no translation in e.g. "ar" but a public translation in "fa"
  2. Mark "fa" as "not visible in app"
  3. Request API for language "ar"
  4. See fallback text which lists the option for "fa"

Expected Behavior

Hidden and disabled languages should not be listed in the fallback translations

Actual Behavior

They are listed if the translations itself are public

Additional Information

Maybe this also has implications in other places of the cms - e.g. available languages in the API or in the sitemap. Maybe we should exclude these languages in the prefetch_public_translations() queryset method?

timobrembeck avatar Oct 17 '22 14:10 timobrembeck