1
votes

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',
        )
    );
}
2
The problem is caused by an empty sys_template table in the datebase as the backend css is loaded from there.Tom
I've the same issue but removing the existing empty sys_template not fixed my issue. :(Hoja.M.A

2 Answers

1
votes

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}
    }
}
0
votes

Try to implement the static TypoScript template of your Extension.

Here is a visual Example