Project

General

Profile

Actions

Bug #97587

open

CEs with no default are thrown away - hideNonTranslated ignored

Added by Henrik Elsner over 2 years ago. Updated over 2 years ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2022-05-09
Due date:
% Done:

0%

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

Description

Language Issues are pretty hard so i try to make it simple..

We have an inpage navigation element which allows to link content elements on the same page.
So we got a selectMultipleSideBySide for this.

To resolve those selections we use the DatabaseQueryProcessor with "includeRecordsWithoutDefaultTranslation = 1" set.

Now the issue:
When used in free mode or "custom values" within the element select field, the records will be found by the `getRecords` query, but thrown away by the `getLanguageOverlay` within the same method.
`typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:6276`

Solution/ my evaluation why is that?

`typo3/sysext/core/Classes/Domain/Repository/PageRepository.php:379`
Here the OverlayType is checked, but missing the floating handling.

So instead of:
`$languageAspect->getOverlayType() === $languageAspect::OVERLAYS_MIXED ? '1' : 'hideNonTranslated'`
it should be
`$languageAspect->getOverlayType() === $languageAspect::OVERLAYS_MIXED || $languageAspect->getOverlayType() === $languageAspect::OVERLAYS_ON_WITH_FLOATING ? '1' : 'hideNonTranslated'`


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #89131: Records that are only available in specific language (no default parent) are not considered using consistentTranslationOverlayHandlingNew2019-09-10

Actions
Actions #1

Updated by Henrik Elsner over 2 years ago

  • Related to Bug #89131: Records that are only available in specific language (no default parent) are not considered using consistentTranslationOverlayHandling added
Actions #2

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74575

Actions #3

Updated by Riccardo De Contardi over 2 years ago

  • Category set to Localization
Actions #4

Updated by Astrid Haubold over 2 years ago

I stumbled over this too and I am not sure if hideNonTranslated needs to be set at all (anymore)?
In my opinion to guarantee consistent behaviour throughout only $languageAspect->getOverlayType() should be used.
In typo3/sysext/core/Classes/Domain/Repository/PageRepository.php:377 ff.:

return $this->getRecordOverlay(
                    $table,
                    $row,
                    $languageAspect->getContentId(),
                    $languageAspect->getOverlayType()
                );

Accordingly in line 696:

elseif (
    ($OLmode === 'hideNonTranslated' || $OLmode === LanguageAspect::OVERLAYS_ON_WITH_FLOATING) &&
    (int)$row[$tableControl['languageField']] === 0
) 

The next step would be to allow fallback if 0 is explicitly set in fallback chain: so only unset if 0 is not explicitly set as fallback language

Actions

Also available in: Atom PDF