Project

General

Profile

Actions

Bug #86972

closed

All Language Content Element are not displayed in default language

Added by Muhammed Alat over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Localization
Target version:
Start date:
2018-11-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
localization, language
Complexity:
medium
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #86623: tt_content - error when language content set to -1Closed2018-10-10

Actions
Related to TYPO3 Core - Bug #87950: No language fallbackClosed2019-03-19

Actions
Actions #1

Updated by Muhammed Alat over 5 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?

Actions #2

Updated by Chris no-lastname-given over 5 years ago

  • Related to Bug #86623: tt_content - error when language content set to -1 added
Actions #3

Updated by Chris no-lastname-given over 5 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

Actions #4

Updated by Muhammed Alat over 5 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.

Actions #5

Updated by Gerrit Code Review almost 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

Actions #6

Updated by Gerrit Code Review almost 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

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack almost 5 years ago

  • Related to Bug #87950: No language fallback added
Actions #10

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF