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
Updated by Ingmar Schlecht almost 20 years ago
The description in TSREF begins like that:
"If set, then for each page in the menu it will be checked if the GET variable "&L" has a value different from the current sys_language_uid"
But why does it check if sys_language_uid is different from the value of &L?
I don't really see the reason for checking that. Can you explain it?
Updated by Wolfgang Klinger almost 20 years ago
That's what I suggest to change ;-) I don't know why...
Kasper obviously added this
(found it here in google: http://cvs.sourceforge.net/viewcvs.py/typo3/TYPO3core/ChangeLog?rev=1.130.2.16)
Updated by Kasper Skårhøj over 18 years ago
I have fixed this in next CVS update