Project

General

Profile

Actions

Bug #14623

closed

Hide page if no translation for current language exists bug

Added by Marc Wöhlken about 19 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-03-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The "Hide page if no translation for current language exists" behaves faulty if a website visitor is on a page which has no translations.

Example using english as default language and german as additonal language:
Page1
- English = Page1, German = Seite1
Page2
- English = Page2, German not available
Page3
- English = Page3, German not available

For Page 3 set "Hide page if no translation for current language exists".
When visiting Page1 everything works as expected for english / german language.

When visiting Page2 it does not when using german:
If the language is set to english everything is o.k.
If you switch to german you'll get the following menu:
Page1 - Should be Seite1
Page2 - O.K. since we get the default language
Page3 - Should be hidden since german translations are not available

(issue imported from #M908)


Files

multilanguage.diff (722 Bytes) multilanguage.diff Administrator Admin, 2005-04-07 21:39
Actions #1

Updated by old_henk about 19 years ago

I can reproduce the bug too. (not to difficult). This feature is still in the core (checkout cvs=01/04/05).

While debugging (class.tslib_menu.php) this, it looks that the sys_language_uid is set to "0" somewhere (don't know) when there is no translation of the page.

How should this being solved? There where is is set to 0 when there is no translation (maybe a problem for the rest of the page/site), or somewhere in the class.tslib_menu.php?

Maybe I am wrong, please correct me (still a newbie)

Actions #2

Updated by old_henk about 19 years ago

I just upload a patch. Can somebody of the dev team check this of this is the correct way to solve this. I'll don't know if something will break if this patch is applied. On my site everyting is still working.

Actions #3

Updated by Michael Scharkow about 19 years ago

This should get fixed in 3.8 Will look at it.

Actions #4

Updated by Michael Scharkow about 19 years ago

The fix looks good and simple enough, and it works here, too. I don't see a reason why the language should be resetted other than on the current content. I will make a few more tests and commit this if nothing breaks.

Actions #5

Updated by Michael Scharkow about 19 years ago

I discussed this with Kasper, and he says it's not necessarily a bug. I'll see if this situation can be avoided with proper configuration but for now this is suspended until the BDFL says otherwise.

Actions #6

Updated by Michael Scharkow almost 19 years ago

Okay, it seems like Kasper was right (as usual) when he said this is a config issue. Please try
config.sys_language_mode = content_fallback; 0
in your template setup and see if you get the desired result. It works for me...

Actions #7

Updated by Marc Wöhlken almost 19 years ago

O.K., I'll try the suggested solution and send my feedback.

Actions #8

Updated by Michael Scharkow over 18 years ago

This works with proper TS setup.

Actions

Also available in: Atom PDF