Bug #86972
closed
All Language Content Element are not displayed in default language
Added by Muhammed Alat over 5 years ago.
Updated over 5 years ago.
Tags:
localization, language
Description
I have tried out a fresh new installation of TYPO3 9.5.1 LTS. After building the structure in the backend, I have configured two languages through the site configuration.
On a page without content elements I first create an entry for the second language. Then:
- create a content element in two different languages --> it work's, OK
- create a content element only in one language --> it's displayed only in the corresponding language, OK
- create a content element for "all languages" (The sys_language_uid value is set to 1) -> Only displayed in the different languages, but not in the default language!
All together there are two bugs. The first one is, if you create a content element for all languages (value -1), the backend breaks in typo3_src-9.5.1/typo3/sysext/core/Classes/Site/Entity/Site.php Line 217 - 223 in the method getLanguageById. This one you can fix by the line:
if ($languageId == -1) $languageId = 0;
at the beginning of the method. This bug is only to get the content element editable in the backend. It has no effect to other behaviors.
The real bug is, that the content element is not displayed in the default language. I don't know any solution for this.
I saw that there is a workaround by doing following:
lib.content.element = CONTENT
[...]
lib.content.element.select.languageField = 0
Only then also in the default language content elements with "all languages (value -1)" are displayed.
I don't know if it is really expected that by default CONTENT elements does not display "all language" records in the default language?
- Related to Bug #86623: tt_content - error when language content set to -1 added
All together there are two bugs. The first one is, if you create a content element for all languages (value -1), the backend breaks in typo3_src-9.5.1/typo3/sysext/core/Classes/Site/Entity/Site.php Line 217 - 223 in the method getLanguageById. This one you can fix by the line:
if ($languageId == -1) $languageId = 0;
at the beginning of the method. This bug is only to get the content element editable in the backend. It has no effect to other behaviors.
I can't reproduce this error. In all any installation of Typo3 9.5.1 creating, editing, deleting content elements with language -1 works fine.
The real bug is, that the content element is not displayed in the default language. I don't know any solution for this.
I can confirm this problem
My workaround does not work. The problem with the typoscript command
lib.content.element.select.languageField = 0
is, that it displays all content elements and does not take into account the language anymore. So if you have on another page content elements with correct translations it displays both. But what I want to do is, it should only display content elements with "All language" entries on all languages.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF