I have my extension in TYPO3 4.x with Backened module (EXT:wec_map),
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'tools','txwecmapM1',
'',
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('wec_map').'Classes/Module/MapAdministration/'
);
Now, I upgraded TYPO3 4.x to TYPO3 8.7.8. I'm having an issue with backend module its shows empty space in the tools menu group. I have replaced deprecated module registration method like this:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'txwecmapM1',
'tools', // Make module a submodule of 'web'
'txwecmapM1', // Submodule key
'', // Position
[
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/Resources/Public/Icons/user_mod_bewebuser.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Languages/Module/MapAdministration/locallang_mod.xlf',
]
);
It's working nice but the icon shows default typo3 icon and label shows ":mlang_labels_tablabel". can anyone help me out in this?
second thing, while i click on module its shows:
"Could not analyse class: "Tx_TxwecmapM1_Controller_accessController" maybe not loaded or no autoloader? Class Tx_TxwecmapM1_Controller_accessController does not exist"
Please help me...
The module definition looks perfectly ok to me -
but AFAIK, it should read
$_EXTKEYinstead of$extKey.Oh, and the second problem might be caused by not using the namespace here.
This should do it: