Bug #14508
closedprotectLvar=all is not implemented right
0%
Description
If I set protectLvar in HMENU I expect links in menus to fall back to the default language if there's no translation of this page in the selected language available. But that doesn't work right IMHO.
I'll give an example (I use RealURL):
I have a page "discover" in English (default) and Spanish (id 1), now if I visit this page and select "Spanish" the new URL looks like "/es/discover/" (that adds &L=1), now all the links in the menu have "/es/" prepended and that's definitely wrong because all the other pages are not translated!
The reason for this is, that there is a check if GP:L is the same as the current sys_language_uid
(that's the case and that's why it fails here)
I may not understand the main reason for this, but IMHO if I specify that I want this check for "all" pages, I expect it to work as described above! I suggest to simply remove " && $Lvar!=$GLOBALS['TSFE']->sys_language_uid" as it's unnecessary here...
Please review my patch and give me feedback (about possible side effects etc.)... tia
(issue imported from #M708)
Files