1

Pretty new to Sitecore and FED in general. I'm currently trying to solve the following bug that we have:

We have a LanguageSelector component and the website's default language is English. When we select a language from the dropdown of which the XM Cloud has no content we get redirected to the 404 Page not found page. Instead, we want to have the English fallback language. I feel that I should somehow check if we get a 404 page not found error when a different language is chosen hence the const checkContentAvailiblity, but I'm stuck on how to proceed further.

Is someone able to help out or point me in a different direction? Would be greatly appreciated! Any tips or pointers are welcome!

2
  • Is language fallback enabled on your instance?
    – Richard Seal
    Commented Jun 13 at 12:50
  • Hi @RichardSeal thanks for replying! This morning I indeed found the XM documentation for fallback language and this was configured/setup properly. Our React project also has a EnableLanguageFallback.config. Snippet: <site name="shell"> <patch:attribute name="enableItemLanguageFallback">true</patch:attribute> <patch:attribute name="enableFieldLanguageFallback">true</patch:attribute> </site> <site name="website"> <patch:attribute name="enableItemLanguageFallback">true</patch:attribute> <patch:attribute name="enableFieldLanguageFallback">true</patch:attribute>
    – DJanssen
    Commented Jun 13 at 14:11

1 Answer 1

0

So today it got solved! Turns out it shouldn't have been a bug at all... The fallback language was correctly implemented, however the testers just didn't publish it properly. https://doc.sitecore.com/xmc/en/developers/xm-cloud/language-fallback-and-publishing.html

When you publish fallback language versions for the first time, you must publish each version to ensure that they are saved on Edge.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.