Bug #20511
closedsmall stability fix proposal for plugin flexform handling
0%
Description
In some case, when a an XML tag is not correctly closed in the flexform_ds.xml of an extension, editing the plugin tt_content element properties in the Typo3 backend displays nothing but the following error :
Fatal error: Cannot use string offset as an array in /var/www/vhosts/agam.org/httpdocs/typo3_src-4.2.6/t3lib/class.t3lib_tceforms.php on line 2371
Changing the following code after line 2371 enables displaying the flexform properly, but with an appropriate error message helping debugging the problem (while the above error does not help) :
This code :
$tabParts[] = array(
'label' => ($dataStruct['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetTitle']) : $sheet),
'description' => ($dataStruct['ROOT']['TCEforms']['sheetDescription'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetDescription']) : ''),
'linkTitle' => ($dataStruct['ROOT']['TCEforms']['sheetShortDescr'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetShortDescr']) : ''),
'content' => $sheetContent
);
Should be changed to :
if(is_array($dataStruct['ROOT']))
{
$tabParts[] = array(
'label' => ($dataStruct['ROOT']['TCEforms']['sheetTitle'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetTitle']) : $sheet),
'description' => ($dataStruct['ROOT']['TCEforms']['sheetDescription'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetDescription']) : ''),
'linkTitle' => ($dataStruct['ROOT']['TCEforms']['sheetShortDescr'] ? $this->sL($dataStruct['ROOT']['TCEforms']['sheetShortDescr']) : ''),
'content' => $sheetContent
);
}else{
$tabParts[] = array(
'label' => $sheet,
'description' => '',
'linkTitle' => '',
'content' => $sheetContent
);
}
Adding the following fixe makes a small stabitity and reliability improvement to plugin flexforms display for extension developers.
(issue imported from #M11198)
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.