TYPO3 4.7.2 includes extbase plugin through typoscript

I wrote an extension, and the implementation of the plugin through the backend does everything right.

But when I try to implement my extension through typoscript, I get this error every time:

An error has occurred!

The default controller cannot be defined. Please check Tx_Extbase_Utility_Extension :: configurePlugin () in your ext_localconf.php.

and I don’t know why .. I tried different implementations (for tx_extbase_core_bootstrap-> run or tx_extbase_dispatcher-> it sends with and without additional information), and the current typoscript looks like this:

plugin.tx_graphichmenu { settings { menuUid = 1 } } lib.tx_graphichmenu = USER lib.tx_graphichmenu { userFunc = tx_extbase_core_bootstrap->run extensionName = Graphichmenu pluginName = Graphicmenu controller = MenuController action = showAction } temp.mainTemplate.subparts.stickyfooter < lib.tx_graphichmenu 

I checked everything twice and thrice, and I did not find a single error ... I tried it without a part of the "action" and the "controller" and nothing changed

my configurePlugin part in ext_localconf.php looks like this:

 Tx_Extbase_Utility_Extension::configurePlugin( $_EXTKEY, 'Graphicmenu', array( 'Menu' => 'show', ), // non-cacheable actions array( 'Menu' => '', ) ); 

The show action has no parameters. there I load the ts settings, from where I get the Uid of the object to display

PS: after each change, I cleared the cache and deleted the temp_CACHED _... files in typo3conf

+4
source share
1 answer

You need to change your bootstrap, there is a general syntax:

 lib.foo = USER lib.foo { userFunc = tx_extbase_core_bootstrap->run extensionName = YourExtension pluginName = YourPlugin vendorName = YourVendor switchableControllerActions { Standard { 1 = action2 2 = action3 } } } 

Note. The value of CamelCase in extensionName is important! (Thanks to Kai for confirming), so if extkey: kai_some_extension , it should be written as KaiSomeExtension

So, in your case, it should be something like:

 lib.foo = USER lib.foo { userFunc = tx_extbase_core_bootstrap->run extensionName = GraphicHmenu pluginName = Graphicmenu switchableControllerActions { Menu { 1 = show } } } 
+7
source

Source: https://habr.com/ru/post/1432545/


All Articles