Bug #86972
closedAll Language Content Element are not displayed in default language
100%
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.
Updated by Muhammed Alat almost 6 years ago
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?
Updated by Chris no-lastname-given almost 6 years ago
- Related to Bug #86623: tt_content - error when language content set to -1 added
Updated by Chris no-lastname-given almost 6 years ago
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
Updated by Muhammed Alat almost 6 years ago
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.
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59993
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59993
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60192
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0dd23086dbea238963218ac6f089037a487149c7.
Updated by Benni Mack over 5 years ago
- Related to Bug #87950: No language fallback added