Issue Bug Closed

#17711T3DataStructure with sheet references will not show sheetTitle,sheetDescription and sheetShortDescr

Juergen Deisenroth 10/22/07, 08:45 updated 05/14/08, 10:37

Description

Following the Typo3 Core APIs instruction at page 170 for Sheet references, the sheetTitle,sheetDescription and sheetShortDescr in the referenced files will not be displayed.
In the function class.t3lib_tceforms.php::getSingleField_typeFlex the variable $sheetCfg contains only the filepath when working with sheet references. To fix the issue insert a little code snippet above the $tab_parts[] – assign.

// Check sheet configuration for sheet references (example: “<sDEF>EXT:my_extension/my_sheet_file.xml</sDEF>”, $sheetCfg contains “EXT:my_extension/my_sheet_file.xml”)
if( !is_array($sheetCfg) && is_string($sheetCfg) && is_array($dataStruct[‘ROOT’][‘TCEforms’]) ) {
$sheetCfg = array();
if( isset($dataStruct[‘ROOT’][‘TCEforms’][‘sheetTitle’]) ) $sheetCfg[‘ROOT’][‘TCEforms’][‘sheetTitle’] = $dataStruct[‘ROOT’][‘TCEforms’][‘sheetTitle’];
if( isset($dataStruct[‘ROOT’][‘TCEforms’][‘sheetDescription’]) ) $sheetCfg[‘ROOT’][‘TCEforms’][‘sheetDescription’] = $dataStruct[‘ROOT’][‘TCEforms’][‘sheetDescription’];
if( isset($dataStruct[‘ROOT’][‘TCEforms’][‘sheetShortDescr’]) ) $sheetCfg[‘ROOT’][‘TCEforms’][‘sheetShortDescr’] = $dataStruct[‘ROOT’][‘TCEforms’][‘sheetShortDescr’];
}
// Add to tab:
$tabParts[] = array(
‘label’ => ($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetTitle’] ? $this->sL($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetTitle’]) : $sheet),
‘description’ => ($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetDescription’] ? $this->sL($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetDescription’]) : ‘’),
‘linkTitle’ => ($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetShortDescr’] ? $this->sL($sheetCfg[‘ROOT’][‘TCEforms’][‘sheetShortDescr’]) : ‘’),
‘content’ => $sheetContent
);

The function getSingleField_typeFlex changed with typo3 version 4, but a look at the source shows the same issue.
(issue imported from #M6565)

Reviews 0

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