Problem/Motivation
I think this bug is so thin. But i try to explain.
I created a site in Russian. So the default language was Russian. I did not used multilingual tools.
Then I decided to post about cryptocurrencies in English and I added multilingual tools and translated Taxonomy, Menu, Node fields and some Blocks into English.
But Russian remained a Default language.
I had configured 'Detection and selection' like this:
detect by: URL:
Russian - has no prefix
Engilsh - prefix /en
I had bilingual Main menu with Russian and English links to taxonomy terms. I made it by my hands without buggy 'Taxonomy Term' module that has bad multilingual support.
Every time when I clear cache in Configuration > Performance > Clear cache my Main menu is broken like this:
Russian menu item "Авто" is a link to english path '/auto' ()instead of '/avto', a letter difference) but there is no such path on my site, because english paths should have prefix '/en'.
And english menu item 'Auto' has also path '/auto' but there is no such page, because english paths should start from prefix '/en' and it should be '/en/auto'.
When I edited my main menu back it works, but then I clear cache again and everything is broken again.
I spent a day to detect that cache clear breaks this, and finally solved my headache. Just need to make English default. Also I deleted prefix from english language but that is not important.
Steps to reproduce
1. Create a Drupal 9 site on any language except English (with only one language, without multilingual)
2. Install ctools and pathauto module
3. Create any Taxonomy vocabulary like 'Categories'
4. Create pathauto template for vocabulary Categories witj [term:name]
5. Fill few taxonomy terms Categories with automatic url by pathaouto, like Дискотеки, Пляжи, Отели, Магазины.
6. Fill Main menu with links to terms of vocabulary Categories by your hands
7. Make your site multilingual with non-english language as Default, and Detection and selection by URL where non-english language has no prefix, but English has prefix '/en'
8. Make your Vocabulary translatable and Menu translatable
9. Translate terms of Categories to English, translate Main menu items to english
10. Clear cache
Non-english items in main menu will get paths to their english translations and will not work so.
The English items of Main menu also will have their paths but without prefix '/en' and so also will not work!
Proposed resolution
Just make English Default language.
Remaining tasks
But that is not enough. Need to fix code.
Comments