Problem/Motivation
I have a multilingual site: French (default language) and English. Some content type are translatable and their nodes are translated in both language, while other content types are published only in the default language. Interface language selector is available on the entire site regardless nodes have or not a translation.
- Switching language works on nodes display (regardless nodes have or not a translation)
- Switching language doesn't work on comments display (using permalink)
Steps to reproduce
- Enable two languages A and B, set A as default (admin/config/regional/language)
- Configure the Interface text language detection to "Language from the URL" with path prefix (admin/config/regional/language/detection)
- Create a content type (admin/structure/types)
- Verify that A is the default language and that translation is not enabled (admin/structure/types/manage/the_content_type > Language settings)
- Do the same for the associated comment type (admin/structure/comment)
- Create some content and comments
- Display a node in default language (https://www.example.com/node/1234)
- Pick the comment permalink or click on it's title (https://www.example.com/comment/72471#comment-72471)
OK that displays fine. Switching interface language on not translated nodes works
- Switch the language interface to language B => You're redirected to this url "https://www.example.com/en/comment/72471" and you get a 404 "Page not found" error
- Switch back to the default language => You're redirected to the front page (https://www.example.com/?page=0)
Switching interface language on not translated comments DOESN'T work