Project

General

Profile

Actions

Feature #16424

closed

Missing sheets inclusion in flexforms?

Added by Cyrille over 17 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-08-03
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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>

&lt;sheets&gt;
&lt;sDEF&gt;fileadmin/sheets/default_sheet.xml&lt;/sDEF&gt;
&lt;s_welcome&gt;fileadmin/sheets/welcome_sheet.xml&lt;/s_welcome&gt;
&lt;/sheets&gt;

</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

t3_bug_3969.patch (1.13 KB) t3_bug_3969.patch Administrator Admin, 2007-05-07 20:48

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #17181: Flexforms dosen't resolve sheetsClosedDmitry Dulepov2007-04-03

Actions
Related to TYPO3 Core - Bug #17711: T3DataStructure with sheet references will not show sheetTitle,sheetDescription and sheetShortDescrClosedDmitry Dulepov2007-10-22

Actions
Related to TYPO3 Core - Bug #17716: Fatal error in TCEForms: Fatal error: Cannot use string offset as an arrayClosedDmitry Dulepov2007-10-23

Actions
Actions #1

Updated by Andreas Jonderko about 17 years ago

I can acknowledge this one, someone planed it to resolve this problem?

Actions #2

Updated by Andreas Jonderko about 17 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
);

Actions #3

Updated by Kasper Middelboe almost 17 years ago

This bug should be a "bug" or "crash" and not "feature" - its obviously supposed to be working :)

Actions #4

Updated by Dmitry Dulepov over 16 years ago

And 4.1.4

Actions

Also available in: Atom PDF