Feature #97639
Updated by Simon Schaufelberger almost 2 years ago
Request: <pre> cObjGetSingle( 'CONTENT', [ 'table' => 'tx_extname_domain_model_brand', 'select.' => [ 'pidInList' => '0', 'uidInList' => '###brandUid###', 'selectFields' => 'title', 'markers.' => [ 'brandUid.' => [ 'data' => 'site:brand', ] ] ] 'renderObj' => 'COA', 'renderObj.' => [ '10' => 'TEXT', '10.' => [ 'value' => '{field:title}', 'insertData' => '1', ] ] 'sanitize' => 1 ] ) </pre> If the record in tx_extname_domain_model_brand is sys_language_uid = 0 or has a translated record everything is fine. But if the record has sys_language_uid = -1 and the page should be rendered in lang = 1, the marker is not filled. As far as I can tell the bug is somewhere in @typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php@ Line 5888 public function getRecords @$statement = $this->exec_getQuery($tableName, $queryConfiguration);@ Returns only the columnNames: <pre> protectedarray(4 items) 0 => 'title' (5 chars) 1 => 'uid' (3 chars) 2 => 'pid' (3 chars) 3 => 't3ver_state' (11 chars) </pre> But should have also returned the column sys_language_uid. Because of this missing column the next function call always returns null <pre>$row $row = $tsfe->sys_page->getLanguageOverlay($tableName, $row); </pre> public/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php Line 620 <pre> && (int)$row[$tableControl['languageField']] !== -1 </pre> is not filled and always false. As a workaround I added sys_language_uid to the selectFields Working request: <pre> cObjGetSingle( 'CONTENT', [ 'table' => 'tx_extname_domain_model_brand', 'select.' => [ 'pidInList' => '0', 'uidInList' => '###brandUid###', 'selectFields' => 'title, sys_language_uid', 'markers.' => [ 'brandUid.' => [ 'data' => 'site:brand', ] ] ] 'renderObj' => 'COA', 'renderObj.' => [ '10' => 'TEXT', '10.' => [ 'value' => '{field:title}', 'insertData' => '1', ] ] 'sanitize' => 1 ] )</pre> )