Reputation: 1607
I copied my own build extension to a new Typo3 installation but now the backend template is not generated correctly anymore. In the "old" installation it is still working. The extension has a configuration menu in the backend that uses the list template. It should load the following template:
/ext/resources/backend/customers/list.html
But the extension loads the following instead:
/ext/resources/customers/list.html
In the ext_tables.php it is registered as follow:
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'MTR.' . $_EXTKEY,
'user', // Make module a submodule of 'user'
'mtcus', // Submodule key
'', // Position
array(
'Customers' => 'list',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mtcus.xlf',
)
);
}
Upvotes: 1
Views: 648
Reputation: 1207
After so much of investigation and reference I could able to find the issue with the plugin. When I created back-end module with Extension Builder the default TS configurations where created like. For example consider the extension key is testextension and the BE Module key is custommodulebe in TS file the module template path was registered like.
IN constants.txt file
module.tx_testextension_custommodulebe {
view {
# cat=module.tx_testextension_custommodulebe/file; type=string; label=Path to template root (BE)
templateRootPath = EXT:testextension/Resources/Private/Backend/Templates/
# cat=module.tx_testextension_custommodulebe/file; type=string; label=Path to template partials (BE)
partialRootPath = EXT:testextension/Resources/Private/Backend/Partials/
# cat=module.tx_testextension_custommodulebe/file; type=string; label=Path to template layouts (BE)
layoutRootPath = EXT:testextension/Resources/Private/Backend/Layouts/
}
persistence {
# cat=module.tx_testextension_custommodulebe//a; type=string; label=Default storage PID
storagePid =
}
}
IN setup.txt
module.tx_testextension_custommodulebe {
persistence {
storagePid = {$module.tx_testextension_custommodulebe.persistence.storagePid}
}
view {
templateRootPath = {$module.tx_testextension_custommodulebe.view.templateRootPath}
partialRootPath = {$module.tx_testextension_custommodulebe.view.partialRootPath}
layoutRootPath = {$module.tx_testextension_custommodulebe.view.layoutRootPath}
}
}
Fix was we only need to define the extension key in this module configuration.
Corrected Solution constants.txt
module.tx_testextension {
view {
# cat=module.tx_testextension/file; type=string; label=Path to template root (BE)
templateRootPath = EXT:testextension/Resources/Private/Backend/Templates/
# cat=module.tx_testextension/file; type=string; label=Path to template partials (BE)
partialRootPath = EXT:testextension/Resources/Private/Backend/Partials/
# cat=module.tx_testextension/file; type=string; label=Path to template layouts (BE)
layoutRootPath = EXT:testextension/Resources/Private/Backend/Layouts/
}
persistence {
# cat=module.tx_testextension//a; type=string; label=Default storage PID
storagePid =
}
}
setup.txt
# Module configuration
module.tx_testextension {
persistence {
storagePid = {$module.tx_testextension.persistence.storagePid}
}
view {
templateRootPath = {$module.tx_testextension.view.templateRootPath}
partialRootPath = {$module.tx_testextension.view.partialRootPath}
layoutRootPath = {$module.tx_testextension.view.layoutRootPath}
}
}
Upvotes: 1