【问题标题】:TYPO3 Inline Relational Record Editing (IRRE)TYPO3 内联关系记录编辑 (IRRE)
【发布时间】:2018-11-28 14:56:54
【问题描述】:

我创建了一个新的内容元素,它将一个名为 heroslider 的字段添加到 tt_content。 TCA 如下所示:

'heroslider' => [
    'config' => [
            'type'           => 'inline',
            'allowed'        => 'tx_ext_domain_model_heroslider_item',
            'foreign_table'  => 'tx_ext_domain_model_heroslider_item',
            'foreign_field'  => 'tt_content_uid',
            'foreign_sortby' => 'sorting',
            'foreign_label'  => 'header',
            'maxitems'       => 99,
            'appearance'     => [
                    'collapseAll'  => 1,
                    'expandSingle' => 1,
            ],
    ],
],

现在,当我在 BE 中添加 heroslider_item 时,它会正确存储,但字段 tt_content_uid 除外。此字段包含零而不是内容元素的uid

你知道我错过了什么吗?

提前致谢!

【问题讨论】:

    标签: typo3 typo3-9.x


    【解决方案1】:

    在您的表tx_ext_domain_model_heroslider_item 中,您错过了反向表名称的字段。至少你没有在你的关系中声明它:

    foreign_table_field = parent_table
    

    您知道您的父记录总是tt_content,但 TYPO3 需要一些帮助。


    ANFSCD:

    为什么会有

    'allowed'        => 'tx_ext_domain_model_heroslider_item',
    

    我找不到任何关于选项 allowed 的文档。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-20
      • 1970-01-01
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      • 2019-09-01
      相关资源
      最近更新 更多