tt_address:更新到 Typo3 6.2 后后端未显示扩展字段
Posted
技术标签:
【中文标题】tt_address:更新到 Typo3 6.2 后后端未显示扩展字段【英文标题】:tt_address: extended fields not shown in backend after update to Typo3 6.2 【发布时间】:2016-02-23 10:12:46 【问题描述】:我的 Typo3 6.2 和我的 tt_address 扩展字段存在后端问题: 在 Typo3 4.5 中,我使用 kickstarter 构建的一个小扩展扩展了 tt_address 数据库字段。更新到 Typo3 6.2 后,这些字段在后端消失了,所以我不能再编辑它们了。 在前端一切都很好,所有字段都在那里。 知道如何在后端再次访问这些字段吗? 这是我的 ext_tables.php 的内容:
if (!defined('TYPO3_MODE')) die ('Access denied.');
$tempColumns = array (
'tx_ttaddressextended_kuerzel' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_kuerzel',
'config' => array (
'type' => 'input',
'size' => '30',
'max' => '2',
)
),
'tx_ttaddressextended_kurzwahl' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_kurzwahl',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_ttaddressextended_by_tema' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_by_tema',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_ttaddressextended_ausbildung' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_ausbildung',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
'tx_ttaddressextended_abschluss' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_abschluss',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_ttaddressextended_sprachen' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_sprachen',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_ttaddressextended_laufbahn' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_laufbahn',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
'tx_ttaddressextended_auszeichnungen' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_auszeichnungen',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
'tx_ttaddressextended_besondere_projekte' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_besondere_projekte',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
'tx_ttaddressextended_aktiv' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_aktiv',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
'tx_ttaddressextended_interessen' => array (
'exclude' => 0,
'label' => 'LLL:EXT:tt_address_extended/locallang_db.xml:tt_address.tx_ttaddressextended_interessen',
'config' => array (
'type' => 'text',
'cols' => '30',
'rows' => '5',
'wizards' => array(
'_PADDING' => 2,
'RTE' => array(
'notNewRecords' => 1,
'RTEonly' => 1,
'type' => 'script',
'title' => 'Full screen Rich Text Editing|Formatteret redigering i hele vinduet',
'icon' => 'wizard_rte2.gif',
'script' => 'wizard_rte.php',
),
),
)
),
);
//t3lib_div::loadTCA('tt_address');
if (version_compare(TYPO3_branch, '6.1', '<'))
t3lib_div::loadTCA('tt_content');
t3lib_extMgm::addTCAcolumns('tt_address',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('tt_address',
'tx_ttaddressextended_kuerzel;;;;1-1-1,
tx_ttaddressextended_kurzwahl,
tx_ttaddressextended_by_tema,
tx_ttaddressextended_ausbildung;;;richtext[]:rte_transform[mode=ts],
tx_ttaddressextended_abschluss,
tx_ttaddressextended_sprachen,
tx_ttaddressextended_laufbahn;;;richtext[]:rte_transform[mode=ts],
tx_ttaddressextended_auszeichnungen;;;richtext[]:rte_transform[mode=ts],
tx_ttaddressextended_besondere_projekte;;;richtext[]:rte_transform[mode=ts],
tx_ttaddressextended_aktiv;;;richtext[]:rte_transform[mode=ts],
tx_ttaddressextended_interessen;;;richtext[]:rte_transform[mode=ts]'
);
【问题讨论】:
【参考方案1】:尝试使用 ExtensionManagementUtility 代替类 t3lib_extMgm:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_address', $tempColumns, 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_address', '...');
ExtensionManagementUtility Class Reference >>
【讨论】:
嗨罗伯特,我改了,但结果是一样的:后端没有显示额外的字段:( 我也尝试了ExtensionManagementUtility::add...
,但我收到了一个错误(有一点是一件好事,因为我知道扩展程序已加载)。
您好,请尝试重新安装您的扩展程序(扩展 tt_address)并清理 Typo3 后端中的系统和常规缓存。
如果失败,您可以将您的扩展名 (zip) 发给我吗?
还是不行。我如何向您发送扩展程序?以上是关于tt_address:更新到 Typo3 6.2 后后端未显示扩展字段的主要内容,如果未能解决你的问题,请参考以下文章