You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TYPO3 v12 Flexform中FAL在FLUID模板为空的问题及解决

TYPO3 v12 Flexform FAL图片无法加载问题解决

问题场景

原有Flexform配置在TYPO3 v11中可正常运行,升级至v12后,FLUID模板中的card-image始终为空,且未找到官方v12相关变更说明。

原有配置

Flexform配置

<cardSettings.imageReference>
    <TCEforms>
        <label>
            LLL:EXT:kubus_custom_content/Resources/Private/Language/locallang.xlf:tx_kubus_custom_content.flexform.card.image
        </label>
        <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>flexform_imageReference</fieldname>
            </foreign_match_fields>
            <foreign_label>uid_local</foreign_label>
            <foreign_selector>uid_local</foreign_selector>
            <maxitems>1</maxitems>
            <overrideChildTca>
                <columns>
                    <uid_local>
                        <config>
                            <appearance>
                                <elementBrowserType>file</elementBrowserType>
                                <elementBrowserAllowed>gif,jpg,jpeg,bmp,png,pdf,svg,ai
                                </elementBrowserAllowed>
                            </appearance>
                        </config>
                    </uid_local>
                </columns>
                <types type="array">
                    <numIndex index="0" type="array">
                        <showitem>--palette--;;imageoverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                    <numIndex index="1" type="array">
                        <showitem>--palette--;;imageoverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                    <numIndex index="2" type="array">
                        <showitem>--palette--;;imageoverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                    <numIndex index="3" type="array">
                        <showitem>--palette--;;audioOverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                    <numIndex index="4" type="array">
                        <showitem>--palette--;;videoOverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                    <numIndex index="5" type="array">
                        <showitem>--palette--;;imageoverlayPalette, --palette--;;filePalette
                        </showitem>
                    </numIndex>
                </types>
            </overrideChildTca>
            <filter type="array">
                <numIndex index="0" type="array">
                    <userFunc>
                        TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterInlineChildren
                    </userFunc>
                    <parameters>
                        <allowedFileExtension>gif,jpg,jpeg,bmp,png,pdf,svg,ai</allowedFileExtension>
                    </parameters>
                </numIndex>
            </filter>
            <appearance>
                <useSortable>1</useSortable>
                <headerThumbnail>
                    <field>uid_local</field>
                    <width>45</width>
                    <height>45c</height>
                </headerThumbnail>
                <showPossibleLocalizationRecords>0</showPossibleLocalizationRecords>
                <showRemovedLocalizationRecords>0</showRemovedLocalizationRecords>
                <showSynchronizationLink>0</showSynchronizationLink>
                <showAllLocalizationLink>0</showAllLocalizationLink>
                <enabledControls>
                    <info>1</info>
                    <new>0</new>
                    <dragdrop>1</dragdrop>
                    <sort>0</sort>
                    <hide>1</hide>
                    <delete>1</delete>
                    <localize>1</localize>
                </enabledControls> 
            </appearance>
        </config>
    </TCEforms>
</cardSettings.imageReference>

TypoScript处理器

30 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
30 {
    references {
        table = tt_content
        fieldName = flexform_imageReference
    }
    as = card-image
}

解决方案

将Flexform配置中的顶级节点<cardSettings.imageReference>修改为<flexform_imageReference>,并同步调整FLUID模板中对应的数据读取逻辑后,问题解决。

注:这已是自TYPO3 v10以来第三次因FAL图片相关逻辑修改Flexform代码,过程较为繁琐。


内容的提问来源于stack exchange,提问作者180690

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 16:07:12