[TYPO3-core] RFC: #6581 Fatal error in TCEforms: Cannot use string offset as an array
Dmitry Dulepov [typo3]
dmitry at typo3.org
Tue Oct 23 20:39:19 CEST 2007
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
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TCEforms-FF-sheets-bug.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071023/a54aaf6b/attachment.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T3X_user_ffbug.t3x
Type: application/octet-stream
Size: 5916 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071023/a54aaf6b/attachment.obj
More information about the TYPO3-team-core
mailing list