TYPO3 Exception 1187176358

#1187176358: The controller name must be a valid string, integer given.

TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerNameException thrown in file typo3_src/typo3/sysext/extbase/Classes/Mvc/Request.php.

Possible error sources

configurePlugin: Actions declared incorrectly

This error happens when the first array does have an integer as key instead of the plugin name:

array('show')
Copied!

The correct solution is this:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'FooExt',
    'PluginName',
    [\Foo\Ext\Controller\PluginController::class => 'show'],
    [\Foo\Ext\Controller\PluginController::class => 'show'] // non-cacheable actions
);
Copied!