DCE 部分中的 TYPO3 FAL 图像

问题描述 投票:0回答:2

我正在将旧的 v7 TYPO3 安装迁移到 v11。但我对 DCE 内容元素感到困惑,该元素使用部分,并且在部分内与

sys_file
相关。

旧的 Flexform 代码如下所示:

<config>
    <type>group</type>
    <internal_type>db</internal_type>
    <appearance>
        <elementBrowserType>file</elementBrowserType>
        <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</elementBrowserAllowed>
    </appearance>
    <allowed>sys_file</allowed>
    <size>1</size>
    <minitems>0</minitems>
    <maxitems>1</maxitems>
    <show_thumbs>1</show_thumbs>
</config>

当我尝试迁移 Flexform 代码以使用 FAL 时,我最终在 TYPO3 后端中收到此错误消息:

#1458745468 意外值异常
字段名称“pi_flexform”上的 Flex 表单数据结构无效,部分容器“container_carousel”中的元素“sliderImage”:不允许在 Flex 表单部分中嵌套内联元素。

我使用的 Flexform 是 DCE 的预设:

<config>
    <type>inline</type>
    <foreign_table>sys_file_reference</foreign_table>
    <foreign_field>uid_foreign</foreign_field>
    <foreign_sortby>sorting_foreign</foreign_sortby>
    <foreign_table_field>tablenames</foreign_table_field>
    <foreign_match_fields>
        <fieldname>{$variable}</fieldname>
    </foreign_match_fields>
    <foreign_label>uid_local</foreign_label>
    <foreign_selector>uid_local</foreign_selector>
    <overrideChildTca>
        <columns>
            <uid_local>
                <config>
                    <appearance>
                        <elementBrowserType>file</elementBrowserType>
                        <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</elementBrowserAllowed>
                    </appearance>
                </config>
            </uid_local>
        </columns>
        <types type="array">
            <numIndex index="2">
                <showitem>--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
            </numIndex>
        </types>
    </overrideChildTca>

    <minitems>0</minitems>
    <maxitems>99</maxitems>

    <appearance>
        <useSortable>1</useSortable>
        <headerThumbnail>
            <field>uid_local</field>
            <width>45c</width>
            <height>45</height>
        </headerThumbnail>

        <enabledControls>
            <info>1</info>
            <dragdrop>1</dragdrop>
            <hide>1</hide>
            <new>0</new>
            <sort>0</sort>
            <delete>1</delete>
        </enabledControls>

        <createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
    </appearance>

    <behaviour>
        <allowLanguageSynchronization>1</allowLanguageSynchronization>
    </behaviour>

    <dce_load_schema>1</dce_load_schema>
    <dce_get_fal_objects>1</dce_get_fal_objects>
</config>

DCE 的节项中是否有可能存在 FAL 关系?

或者还有其他想法如何解决我的问题吗?

typo3 typo3-11.x
2个回答
0
投票

是否有可能在 a 的节项中存在 FAL 关系? 大连商品交易所?

不。问题似乎出在这种关系的 ID 上。

或者还有其他想法如何解决我的问题吗?

对于某些(少数)情况,具有多个字段可能是一个解决方案。例如。对于具有字段“Pic1”、“Text1”、...、“Pic5”、“Text5”的图像滑块。

或者摆脱 DCE 并迁移到自定义 CE ;-)


0
投票

您可以使用 Flex 表单解决此问题,方法是将 $GLOBALS['TCA']['sys_file']['ctrl']['hideTable'] = 0;在 dce/Configuration/TCA/Overrides/tt_content.php

© www.soinside.com 2019 - 2024. All rights reserved.