I'm experimenting a bit with TYPO3 backend modules and I'm trying to get a view when I click my module in the left menu in the backend. However when I click this I get the following message:
Sorry, the requested view was not found. The technical reason is: No template was found. View could not be resolved for action "list" in class "MyVendor\MyModule\Controller\ConnectionController".
I have the view for the list action in the folder Resources/Private/Backend/Templates/Connection and the file is called List.html (uppercamelcase)
I'm using TYPO3 version 7.6.15 and I made this module with the extension builder.
Any help would be appreciated.
Add your extension to the website node. Until you add it, the setup.ts won't work.
You can also change your template root path (the relative path from where the extension takes the tempaltes):
go to the
file (or setup.txt file; depends on personal preferences and local configuration) and add the following line
for example it could look like this:
NOTE: slider is just a placeholder. You can simply replace it with your extension name
I found the problem. For some reason the Extension Builder places the folders Templates, Layouts and Partials in a folder called "Backend". I moved these three folders to Resources/Private/ and now it works.
Weird thing it does that.
Some possible reasons for this (or similar) errors:
1. Forgetting to include the TypoScript static templates
This will activate the TypoScript under Configuration/TypoScript
2. Wrong path
The Template paths set via TypoScript must match the available template paths in the filesystem.
Usually, the default path is:
or
This must have been set correctly via TypoScript. For example:
Configuration/TypoScript/setup.typoscript:
3. Use correct filenames
The name of the Controller matches the name of the subdirectory in the Templates directory. The name of the template file is capitalized.
matches