Feature #16424
closedMissing sheets inclusion in flexforms?
0%
Description
According to tutorial http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/7/1/
In flexforms, we should be allowed to include sheets like this :
<T3DataStructure>
<sheets>
<sDEF>fileadmin/sheets/default_sheet.xml</sDEF>
<s_welcome>fileadmin/sheets/welcome_sheet.xml</s_welcome>
</sheets>
</T3DataStructure>
But when trying to include a sheet, it outputs in BE the following error when accessing plug in configuration :
Fatal error: Cannot use string offset as an array in D:\ITC\typo3-2\htdocs\typo3wamp\t3lib\class.t3lib_tceforms.php on line 2136
(issue imported from #M3969)
Files
Updated by Andreas Jonderko almost 18 years ago
I can acknowledge this one, someone planed it to resolve this problem?
Updated by Andreas Jonderko almost 18 years ago
The problem is that in the $tabParts array.
The script is trying to access $sheetCfg as an array and this is of course only a String ... it is at line ~ 2198
Original:
//-----------------
// 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
);
You can solve this by adding this only a check and a copy:
// new line:
//---------------
if (!is_array($sheetCfg)) $sheetCfg = $dataStruct; // if is not an array, so except to copy the included array from file
// 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
);
Updated by Kasper Middelboe over 17 years ago
This bug should be a "bug" or "crash" and not "feature" - its obviously supposed to be working :)