我正在使用TYPO3的FCE扩展来创建简单的Contentelements。它们在TYPO3 v8中可以正常工作,但是当我在TYPO3 9.5中安装它们时,我的FlexForms不再起作用。我找不到问题,希望这里有人可以帮助我。也许有什么变化,我没注意到吗?
当完整的扩展程序正常工作并且一切看起来都很好时,ext_tables.php肯定存在某种问题,所以我将在这里复制我的内容。
TCA呼叫正在执行,当我在列表中添加例如“ header”时,它将直接显示。所以pluginSignature也很好。我还尝试添加$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
,这也无济于事。
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Content',
'Contactbar'
);
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_content';
$TCA['tt_content']['types'][$pluginSignature]['showitem'] = '
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, pi_flexform,
--div--;Style, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,
--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, hidden, starttime, endtime,tx_gridelements_container, tx_gridelements_columns';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_contactbar.xml', '*');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TSconfig/Content.ts">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'contactbar');
答案 0 :(得分:0)
我已经设法自己修复了。如果有人遇到相同的错误,则解决方案非常简单。将您的tt_content声明移至/Configuration/TCA/Overrides/tt_content.php
所以您有这样的ext_tables:
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Content',
'Contactbar'
);
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_content';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TSconfig/Content.ts">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'contactbar');
您将拥有tt_content.php,如下所示:
<?php
$tca = [
'types' => [
'contactbar_content' => [
'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, pi_flexform,--div--;Style, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,--div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, hidden, starttime, endtime,tx_gridelements_container, tx_gridelements_columns'
]
]
];
$GLOBALS['TCA']['tt_content'] = array_replace_recursive($GLOBALS['TCA']['tt_content'], $tca);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'*',
'FILE:EXT:contactbar/Configuration/FlexForms/flexform_contactbar.xml',
'contactbar_content'
);
答案 1 :(得分:0)
您的错误是a except bb`c
不再存在...只需使用$TCA
。
(在您的情况下为$GLOBALS['TCA']
,而不是$GLOBALS['TCA']['tt_content']['types'][$pluginSignature]['showitem']
)
还要确保将此配置放置在文件$TCA['tt_content']['types'][$pluginSignature]['showitem']