[TYPO3-core] RFC: #6581 Fatal error in TCEforms: Cannot use string offset as an array

Ingmar Schlecht ingmar at typo3.org
Sat Oct 27 19:44:16 CEST 2007


+1 based on code review and testing.

Attached is the patch ported to latest trunk.

Please commit!

cheers
Ingmar

Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: bug
> 
> BT references:
> http://bugs.typo3.org/view.php?id=6581
> http://bugs.typo3.org/view.php?id=6565
> http://bugs.typo3.org/view.php?id=5347
> http://bugs.typo3.org/view.php?id=3969
> 
> Branhes: trunk, 4.1
> 
> Problem: there are several problems, all related to incorrect
> implementation of flexform sheets in TCEforms. TYPO3 CORE API document
> says at [1] that it is possible to use external sheets. In practice
> using external sheets results in "Fatal error: Cannot use string offset
> as an array in /Projects/My/t3test/t3lib/class.t3lib_tceforms.php on
> line 2275". So this functionality does not work at all. The problem is
> in TCEforms::getSingleField_typeFlex(). It has a line "$sheetCfg =
> $dataStructArray['sheets'][$sheet];", which works only for flexforms
> with embedded (not external sheets).
> 
> Solution: next line in the same function resolves sheets using
> t3lib_div::resolveSheetDefInDS() and there we have all necessary
> information. I made patch to use that information instead. To reproduce
> the problem I attach a test extension. It will let you to add to plugins
> to a page. Each plugin has icon with red flag and available from CE
> wizard. One will use embedded sheets, the other - external sheets. Both
> must look identically in typo3. Before patch the second will throw fatal
> PHP error, after patch all will work properly including other three bugs
> mentioned earlier.
> 
> Note: patch is made over trunk. 4.1 has the same code in the problematic
> function, just offset is different.
> 
> [1]
> http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.1.0/view/7/1/#id3677664
> 
> 


-- 
Ingmar Schlecht
TYPO3 Association Active Member
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flexform_sheets_bug-trunk.patch
Type: text/x-diff
Size: 1446 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071027/09914f54/attachment.patch 


More information about the TYPO3-team-core mailing list