Project

General

Profile

Actions

Bug #20511

closed

small stability fix proposal for plugin flexform handling

Added by Alban Cousinie over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

Actions #1

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)?

Actions #2

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.

Actions

Also available in: Atom PDF