TYPO3 从 6.2 更新到 7.6 后 TCA 仍然出错?

After TYPO3 Update from 6.2 to 7.6 still errors in TCA?

我已将 TYPO3 CMS 6.2 更新为 TYPO3 CMS 7.6.16。在其他扩展(tx_newsthird party ext.)和 TCA 中的 changes 出现一些问题之后。 import live-dump 后一切正常...

  1. 升级向导/数据库比较
  2. 更新参考索引
  3. 刷新缓存并清空typo3temp
  4. 停用并重新激活有问题的扩展程序

一切?抱歉不行。扩展不起作用。我不是自己写的扩展。如果我尝试使用此分机在 backend 中添加新数据记录,我将收到此错误:

An item in field form of table tx_blah_domain_model_job is not an array as expected

但是数据库比较完成了。所有表格都正确吗?!

问题出在哪里?我知道没有源代码很难对此进行分析。有一个数据库字段错误,但为什么?是和以前一样的数据库吗?

哪里错了.. ext_tables.php还是……在 TCA 是错误的?我真的需要小费..令人沮丧..

编辑: sys_log 条目

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1439288036: An item in field form of table tx_blah_domain_model_job is not an array as expected | UnexpectedValueException thrown in file /typo3_src/typo3_src-7.6.16/typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php in line 1264.

编辑 2: 我想,一定有某事。在 typo3conf/ext/blah/Configuration/TCA/tx_blah_domain_model_job.php 参见 TCA source code

第 1264 行

/**
 * Sanitize incoming item array
 *
 * Used by TcaSelectItems and TcaSelectTreeItems data providers
 *
 * @param mixed $itemArray
 * @param string $tableName
 * @param string $fieldName
 * @throws \UnexpectedValueException
 * @return array
 */
public function sanitizeItemArray($itemArray, $tableName, $fieldName)
{
    if (!is_array($itemArray)) {
        $itemArray = [];
    }
    foreach ($itemArray as $item) {
        if (!is_array($item)) {
            throw new \UnexpectedValueException(
                'An item in field ' . $fieldName . ' of table ' . $tableName . ' is not an array as expected',
                1439288036
            );
        }
    }

    return $itemArray;
}

a尝试在 TCA 中使用它 tx_imappointments_domain_model_job.php

        'form' => array(
            'exclude' => 1,
            'label' => 'LLL:EXT:im_appointments/Resources/Private/Language/locallang_db.xlf:tx_imappointments_domain_model_job.form',
            'config' => array(
                'type' => 'select',
                'renderType' => 'selectSingle',
                'items' => array(array('', 0)),
                'foreign_table' => 'pages',
                'foreign_table_where' => ' AND pages.pid = 293',
                'minitems' => 0,
                'maxitems' => 1,
            ),
        ),

'items' in 'form' 必须是一个数组,如您的错误消息所述: https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Select.html#items