Bug #105195
Updated by André Buchmann about 2 months ago
Error Message: (1/1) TypeError TYPO3\CMS\Core\Utility\GeneralUtility::xml2array(): Argument #1 ($string) must be of type string, array given, called in /var/www/html/vendor/typo3/cms-form/Classes/Controller/FormFrontendController.php on line 94 in /var/www/html/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php line 1264 <pre><code class="php"> * @return array|string If the parsing had errors, a string with the error message is returned. Otherwise an array with the content. * @see array2xml() * @see xml2arrayProcess() */ public static function xml2array(string $string, string $NSprefix = '', bool $reportDocTag = false): array|string { $runtimeCache = static::makeInstance(CacheManager::class)->getCache('runtime'); $firstLevelCache = $runtimeCache->get('generalUtilityXml2Array') ?: []; $identifier = md5($string . $NSprefix . ($reportDocTag ? '1' : '0')); </code></pre> at TYPO3\CMS\Core\Utility\GeneralUtility::xml2array(array('settings' => array('persistenceIdentifier' => '1:/form_definitions/exampleofallFields.form.yaml'))) in /var/www/html/vendor/typo3/cms-form/Classes/Controller/FormFrontendController.php line 94 <pre><code class="php"> * settings. For now, only finisher settings are overridable. */ protected function overrideByFlexFormSettings(array $formDefinition): array { $flexFormData = GeneralUtility::xml2array($this->request->getAttribute('currentContentObject')?->data['pi_flexform'] ?? ''); if (!is_array($flexFormData)) { return $formDefinition; } if (isset($formDefinition['finishers'])) { </code></pre> I think the cause is rooted in the newly introduced record resolving, as changes to the error just came up after updating TYPO3 FrontendConfigurationManager in my test project from 13.2 to 13.3.x. #104514. The pi_flexform field data is now already parsed to an array, but the form still expects a string here.