In my Typo3 8.7 extension I register a module for the backend. The module itself works fine unfortunately the name is not displayed. (The name in the list on the left side in the module menu).
I have read the doku and did everything what is says there. I have reactivated the extension multiple times and deleted all cache (install cache aswell).
Here is my code in the ext_tables.php
:
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf',
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
Thanks in advance.
Come on my friend, There is only a single mistake I found in your code. You have not passed the key of the translation file. This is the possible issue, please check the below solution:
ext_tables.php
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf:shopModule', // Here is the problem
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
locallang_shop_backend.xlf
<trans-unit id="shopModule">
<source>Shop Management</source>
</trans-unit>
Suggestion: If you have created an extension using extension builder, there is one auto-generated file named locallang_db.xlf use this file for backend labeling.
Hope this makes sense!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.