0
votes

I have started a extension under TYPO3 6.2, and migrated this to TYPO3 7. Now it seems, that all links to Controller/Action combinations are broken. In my TypoScript I have set:

plugin.tx_extensionname.view.pluginNamespace = tx_extensioname

In ext_tables.php I have set:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    $_EXTKEY,
    'Pi1',
    'Controller1: DoSomeLogic1'
);

....

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    $_EXTKEY,
    'Pi12',
    'Controller12: DoSomeLogic12'
);

In ext_localconf.php the plugins get configured:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'MRU.' . $_EXTKEY,
    'Pi2',
    array(
        'Basket'    => 'list, add, remove, address, setDeliveryCountryJson',
        'Order'     => 'directorder, savedirectorder, accountorder, loginorder, saveloginorder, saveaccountorder, overview, doOrder, paymentSuccess, paymentFailure, paymentNotification, paymentCancel',
        'Payment'   => 'index'
    ),
    // non-cacheable actions
    array(
        'Basket' => 'list, add, remove, address, setDeliveryCountryJson',
        'Order'     => 'directorder, savedirectorder, accountorder, loginorder, saveloginorder, saveaccountorder, overview, doOrder, paymentSuccess, paymentFailure, paymentNotification, paymentCancel',
        'Payment'   => 'index'
    )
);

On a page (id 42) I have placed the plugin Pi2. The Basket Controller is shown with list action. All fine. The URL is like this:

http://www.example.com/index.php?id=42

If I add the namespaced Controller Parameter, like this http://www.example.com/index.php?id=42&tx_extensionname[controller]=Basket

I get instantly the

#1313855173: The controller "Basket" is not allowed by this plugin. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

Exception. If I add the pluginname to the URI like this

http://www.example.com/index.php?id=42&tx_extensionname_pi2[controller]=Basket

no expecption is thrown. But if I call a action like this

http://www.example.com/index.php?id=42&tx_extensionname_pi2[controller]=Basket&tx_extensionname_pi2[action]=add

this action gets never called. The Controller with it's first action is called.

I did the update some weeks ago, it is only a dev system, but today I cleared all caches and the error occours. Have I missed something with plugin combined namespaces and the registration/configuration/linking of it?

1
You say your plugin name is "Pi2", but your URL parameter names end with _pi1. Check what happens when changing it to _pi2. - Jost
sorry, written wrong here. I called it with pi2, the error occured. Fixed in post above - Manfred Rutschmann
Is the difference between plugin names in registerPlugin and configurePlugin also a typo? - Jost
Yes. In my environment it's equal. These plugins worked for 6 months very well under 6.2 LTS... - Manfred Rutschmann

1 Answers

0
votes

Ok, it seems that this resolve my issue:

plugin.tx_extensionname.mvc.callDefaultActionIfActionCantBeResolved = 1

With callDefaultActionIfActionCantBeResolved = 0 or missing the above, i get the Not Allowed Exception. Settings this to 1 the Controller and Action gets called.