Ошибка Explode в TYPO3 7.6 с совместимостью 6

У меня возникают ошибки после обновления с TYPO3 6.2 до typo3 7.6 с включенным режимом совместимости6.

В бэкэнде, когда мне нужно отредактировать страницу или статью, контент не загружается в текстовые области, и у меня есть это предупреждение

PHP Warning
Core: Error handler (BE): PHP Warning: explode() expects parameter 2 to be string, array given in /home/typo3/typo3_src-7.6.16/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1556

Чтобы попытаться отладить его, я поставил тест в функции trimExplode typo3 следующим образом:

if(is_array($string)){
$e = new \Exception();
$error_string = $e->getTraceAsString();
$f = fopen('/var/www/html/custom.log', 'a+');
fputs($f, PHP_EOL . "new line" . PHP_EOL);
fputs($f, PHP_EOL . $error_string . PHP_EOL);
fputs($f, PHP_EOL . print_r($string) . PHP_EOL);
fclose($f);
}

Но трассировка стека, которую я получаю, недостаточно ясна для меня, чтобы понять, что не так. Массив пуст, и поэтому, я думаю, проблема не в массиве, а в совместимости6. Кто-нибудь знает в чем проблема с совместимостью6? Вот трассировка стека

new line
#0 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php(1142): TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', Array, true)
#1 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php(75): TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider->processDatabaseFieldValue(Array, 'field_auto_head...')
#2 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/FlexFormSegment.php(51): TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems->addData(Array)
#3 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment->compile(Array)
#4 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(549): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#5 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(54): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->modifyDataStructureAndDataValuesByFlexFormSegmentGroup(Array, 'tx_templavoila_...', Array)
#6 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php(51): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->addData(Array)
#7 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord->compile(Array)
#8 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1118): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#9 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1009): TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm()
#10 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(2043): TYPO3\CMS\Backend\Controller\EditDocumentController->main()
#11 [internal function]: TYPO3\CMS\Backend\Controller\EditDocumentController->mainAction(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#12 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(54): call_user_func_array(Array, Array)
#13 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(168): TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#14 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(95): TYPO3\CMS\Backend\Http\RequestHandler->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest))
#15 /home/typo3/typo3_src-7.6.16/typo3/sysext/core/Classes/Core/Bootstrap.php(302): TYPO3\CMS\Backend\Http\RequestHandler->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#16 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/Application.php(94): TYPO3\CMS\Core\Core\Bootstrap->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#17 /home/typo3/typo3_src-7.6.16/typo3/index.php(20): TYPO3\CMS\Backend\Http\Application->run()
#18 [internal function]: {closure}()
#19 /home/typo3/typo3_src-7.6.16/typo3/index.php(21): call_user_func(Object(Closure))
#20 {main}

1

new line

#0 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php(1142): TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', Array, true)
#1 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php(75): TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider->processDatabaseFieldValue(Array, 'field_feature_b...')
#2 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/FlexFormSegment.php(51): TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems->addData(Array)
#3 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment->compile(Array)
#4 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(549): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#5 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(54): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->modifyDataStructureAndDataValuesByFlexFormSegmentGroup(Array, 'tx_templavoila_...', Array)
#6 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php(51): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->addData(Array)
#7 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord->compile(Array)
#8 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1118): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#9 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1009): TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm()
#10 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(2043): TYPO3\CMS\Backend\Controller\EditDocumentController->main()
#11 [internal function]: TYPO3\CMS\Backend\Controller\EditDocumentController->mainAction(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#12 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(54): call_user_func_array(Array, Array)
#13 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(168): TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#14 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(95): TYPO3\CMS\Backend\Http\RequestHandler->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest))
#15 /home/typo3/typo3_src-7.6.16/typo3/sysext/core/Classes/Core/Bootstrap.php(302): TYPO3\CMS\Backend\Http\RequestHandler->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#16 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/Application.php(94): TYPO3\CMS\Core\Core\Bootstrap->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#17 /home/typo3/typo3_src-7.6.16/typo3/index.php(20): TYPO3\CMS\Backend\Http\Application->run()
#18 [internal function]: {closure}()
#19 /home/typo3/typo3_src-7.6.16/typo3/index.php(21): call_user_func(Object(Closure))
#20 {main}

1

new line

#0 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php(1142): TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', Array, true)
#1 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php(75): TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider->processDatabaseFieldValue(Array, 'recursive')
#2 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/FlexFormSegment.php(51): TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems->addData(Array)
#3 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment->compile(Array)
#4 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(549): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#5 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(54): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->modifyDataStructureAndDataValuesByFlexFormSegmentGroup(Array, 'pi_flexform', Array)
#6 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php(51): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->addData(Array)
#7 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord->compile(Array)
#8 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1118): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#9 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1009): TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm()
#10 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(2043): TYPO3\CMS\Backend\Controller\EditDocumentController->main()
#11 [internal function]: TYPO3\CMS\Backend\Controller\EditDocumentController->mainAction(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#12 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(54): call_user_func_array(Array, Array)
#13 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(168): TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#14 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(95): TYPO3\CMS\Backend\Http\RequestHandler->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest))
#15 /home/typo3/typo3_src-7.6.16/typo3/sysext/core/Classes/Core/Bootstrap.php(302): TYPO3\CMS\Backend\Http\RequestHandler->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#16 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/Application.php(94): TYPO3\CMS\Core\Core\Bootstrap->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#17 /home/typo3/typo3_src-7.6.16/typo3/index.php(20): TYPO3\CMS\Backend\Http\Application->run()
#18 [internal function]: {closure}()
#19 /home/typo3/typo3_src-7.6.16/typo3/index.php(21): call_user_func(Object(Closure))
#20 {main}

1

new line

#0 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php(1142): TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', Array, true)
#1 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php(75): TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider->processDatabaseFieldValue(Array, 'template')
#2 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/FlexFormSegment.php(51): TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems->addData(Array)
#3 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment->compile(Array)
#4 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(549): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#5 /var/www/html/typo3conf/ext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php(54): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->modifyDataStructureAndDataValuesByFlexFormSegmentGroup(Array, 'pi_flexform', Array)
#6 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php(51): TYPO3\CMS\Compatibility6\Form\FormDataProvider\TcaFlexProcess->addData(Array)
#7 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataCompiler.php(99): TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord->compile(Array)
#8 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1118): TYPO3\CMS\Backend\Form\FormDataCompiler->compile(Array)
#9 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(1009): TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm()
#10 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Controller/EditDocumentController.php(2043): TYPO3\CMS\Backend\Controller\EditDocumentController->main()
#11 [internal function]: TYPO3\CMS\Backend\Controller\EditDocumentController->mainAction(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#12 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(54): call_user_func_array(Array, Array)
#13 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(168): TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest), Object(TYPO3\CMS\Core\Http\Response))
#14 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/RequestHandler.php(95): TYPO3\CMS\Backend\Http\RequestHandler->dispatch(Object(TYPO3\CMS\Core\Http\ServerRequest))
#15 /home/typo3/typo3_src-7.6.16/typo3/sysext/core/Classes/Core/Bootstrap.php(302): TYPO3\CMS\Backend\Http\RequestHandler->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#16 /home/typo3/typo3_src-7.6.16/typo3/sysext/backend/Classes/Http/Application.php(94): TYPO3\CMS\Core\Core\Bootstrap->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#17 /home/typo3/typo3_src-7.6.16/typo3/index.php(20): TYPO3\CMS\Backend\Http\Application->run()
#18 [internal function]: {closure}()
#19 /home/typo3/typo3_src-7.6.16/typo3/index.php(21): call_user_func(Object(Closure))
#20 {main}

1

Спасибо за любой ответ или помощь.

РЕДАКТИРОВАТЬ:

Вот функция php, которая создает предупреждение

public static function trimExplode($delim, $string, $removeEmptyValues = false, $limit = 0)
{

if(is_array($string)){
$e = new \Exception();
$error_string = $e->getTraceAsString();
$f = fopen('/var/www/html/custom.log', 'a+');
fputs($f, PHP_EOL . "new line" . PHP_EOL);
fputs($f, PHP_EOL . $error_string . PHP_EOL);
fputs($f, PHP_EOL . print_r($string) . PHP_EOL);
fclose($f);
}

$result = explode($delim, $string);
if ($removeEmptyValues) {
$temp = [];
foreach ($result as $value) {
if (trim($value) !== '') {
$temp[] = $value;
}
}
$result = $temp;
}
if ($limit > 0 && count($result) > $limit) {
$lastElements = array_splice($result, $limit - 1);
$result[] = implode($delim, $lastElements);
} elseif ($limit < 0) {
$result = array_slice($result, 0, $limit);
}
$result = array_map('trim', $result);
return $result;
}

0

Решение

Вы должны обновить TYPO3 6.2 до typo3 7.6.x. В TYPO3 7.6 основные изменения в typo3 defult tables and tables fileds, Итак, если вы не будете следовать всем INSTALL TOOLS Upgrade Wizard steps and compare database specification, Затем сначала выполните все эти шаги.

1

Другие решения

Вы можете переключиться на TYPO3 7-совместимую версию TemplaVoilà. Версии 2.0.x, входящие в репозиторий расширений TYPO3 (TER), на самом деле не совместимы или не работают.

Вы можете переключиться на «TemplaVoilà Plus», например.

0

По вопросам рекламы [email protected]