Issue Bug New Orphaned

#109203ContentObjectRenderer getRecords does not properly respect default language hidden value when overlays are disabled

Daniel Siepmann 03/11/26, 07:17 updated 03/11/26, 07:17

Description

Given the following setup:

A TYPO3 installation with single site but two languages:
1. Language is default language
2. Language is configured as:

   title: 'Französisch (fr-FR)'
   enabled: true
   base: '/fr-FR/'
   typo3Language: 'fr'
   locale: 'fr_FR.utf8'
   iso-639-1: 'fr'
   websiteTitle: ''
   navigationTitle: 'Französisch in Frankreich'
   hreflang: 'fr-FR'
   direction: ''
   fallbackType: 'free'
   fallbacks: '8'
   flag: 'fr'
   languageId: 9

Overlays are off for this language.

Now execute a query like this:

page.10.dataProcessing {
   10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
   10 {
         table = pages
         # The field is an enum with string values, so quote the value
         where = {#tx_e2core_highlight} = '1'
         pidInList = 14101
         recursive = 3
         max = 5
         orderBy = lastUpdated DESC
         as = articles
   }
}

The important part is to query pages.

Now one of the possible pages is hidden in default language, but enabled in foreign
language. l18n_cfg is set to 0.

The expectation is: The page is not fetched, as hiding default language always should
hide the page in all languages, also if overlays are off.

Actual result: The page is fetched in foreign language, failing to build links to the
page, as the expected behaviour is working while building links to the page.

This affects in general everything using the ContentObjectRenderer->getRecords() method:
- cObject CONTENT (to my understanding, not tested)
- cObject RECORDS (to my understanding, not tested)
- data processor TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor (tested)
- … maybe more, maybe also everything using the underlying exec_getQuery() and getQuery() and getQueryConstraints()

This might be related, at least to some degree, to:
- #69022
- #85284
- #88071

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] ContentObjectRenderer getRecords does not properly respect default language hidden value when overlays are disabled Resolves: #109203 Releases: main