0
votes

I created a simple backend module for TYPO3 (7.6.15), with help of the ExtensionBuilder. The UserController and MediaController have a createAction, showAction and listAction. The PanelController just has the showAction which is the main view of the module.

Now I want to link actions from the other controllers in the template of the showAction. The content of the view for the PanelController.showAction (MyExt/Resources/Private/Templates/Panel/Show.html) is the following:

<f:layout name="Default" />
<f:section name="content">
  <f:flashMessages />
  <f:link.action action="create" controller="User">Create new User</f:link.action>
  <f:link.action action="create" controller="Media">Create new Media</f:link.action>
</f:section>

If clicked on one of the links, I get: "Could not analyse class: "MyExt\MyExt\Controller\UserController" maybe not loaded or no autoloader? Class MyExt\MyExt\Controller\UserController does not exist", as error.

I already tried to add plugin.tx_myext.callDefaultActionIfActionCantBeResolved = 1 to the setup.ts and load the other controllers in the initializeAction, but nothing worked so far.

I appreciate all help in advance and wish everyone a nice day!

2
If your classes are not found to be loaded, check first spelling of namespace, class and file name and second reinstall (deinstall/install) your extensions. - jokumer

2 Answers

0
votes

Did you tried to clear the cache manually? Also you need to specify your controller in the composer.json at the section autoload.

After that you can you can dump the autoload classes in the install tool or with this cli command:

composer dump-autoload

Here you can read more about it: typo3-composer

0
votes

I just had a misspelled function that crashed all, unfortunately TYPO didn't give the correct error message. This and checking the database for errors with the install tool fixed it.