Bug #59368
closedNested Flexforms throw Exception
100%
Description
Having a nested Flexform results in this Exception:
Uncaught TYPO3 Exception
#1: PHP Warning: substr() expects parameter 1 to be string, array given in /var/www/dev.e-net.info/vhosts/caretaker/caretaker/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2272 (More information)
TYPO3\CMS\Core\Error\Exception thrown in file
/var/www/dev.e-net.info/vhosts/caretaker/caretaker/typo3_src/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 111.
15 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "substr() expects parameter 1 to be string, array given", "/var/www/dev.e-net.info/vhosts/caretaker/caretaker…po3/sysext/core/Classes/Utility/GeneralUtility.php", 2272, array)
14 substr(array, 0, 200)
/var/www/dev.e-net.info/vhosts/caretaker/caretaker/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
02270: // Default output charset is UTF-8, only ASCII, ISO-8859-1 and UTF-8 are supported!!!
02271: $match = array();
02272: preg_match('/^[[:space:]]*<\\?xml[^>]*encoding[[:space:]]*=[[:space:]]*"([^"]*)"/', substr($string, 0, 200), $match);
02273: $theCharset = $match1 ?: 'utf-8';
02274: // us-ascii / utf-8 / iso-8859-1
You might think why should i do that, but as you can see i am trying to get caretaker to work with 6.2. and it uses nested Flexforms to override test configurations.
Additionally i made a little test record to reproduce this behavior:
TCA:
...
'flexform' => array (
'label' => 'Flexform',
'config' => Array (
'type' => 'flex',
'ds' => array(
'default' => '
<T3DataStructure>
<ROOT>
<type>array</type>
<el>
<xmlTitle>
<TCEforms>
<label>The Title:</label>
<config>
<type>input</type>
<size>48</size>
</config>
</TCEforms>
</xmlTitle>
<flex>
<TCEforms>
<label>Nested Flexform</label>
<config>
<type>flex</type>
<ds>
<default>FILE:EXT:myext/Configuration/FlexForms/nested_flexform.xml</default>
</ds>
</config>
</TCEforms>
</flex>
</el>
</ROOT>
</T3DataStructure>
',
)
)
),
...
I already fixed this issue for me and i am going to push the patch to the review server in a minute.
Thanks,
Thomas
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Gerrit Code Review about 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Gerrit Code Review about 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30590
Updated by Anonymous about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3ae1385c0d806d08aa09d94aa6c9483e95ca4f85.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32675
Updated by Anonymous almost 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 57a03ce33ef6f61fdb2fca1738de966e280fc943.
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed