Project

General

Profile

Actions

Bug #88399

open

Controller action ignored when defined through Typoscript

Added by John Miller about 5 years ago. Updated over 2 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-01-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
extbase TypoScript controller action
Complexity:
Is Regression:
No
Sprint Focus:

Description

Having correctly configured extension in ext_localconf.php, controllers, actions and associated settings assigned via TypoScript are completely ignored during run.

Example;
In ext_localconf.php;

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    VendorName.ExtensionName, 
    PluginName, 
    [
    'Frontend' => 'index',
    'Account' => 'index,login,logout,register'
], [
    'Account' => 'login,logout,register'
]);

Example ts setup;

page = PAGE
page {
    ...

    10 = USER
    10 {
        ...

        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
        vendorName = VendorName
        extensionName = ExtensionName
        pluginName = PluginName
    controller = Frontend
    action = index

    }
}

...

5 = USER_INT
5 {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    vendorName = VendorName
    extensionName = ExtensionName
    pluginName = PluginName
    controller = Account
    action = login
}

In this setup, userFunc is picked up together with vendorName, extensionName, and pluginName. The rest of the details are ignored.

I then went 'under the hood' to check what's going on and found that TYPO3 9 processes controller and action configurations only if they come from GET/POST (ServerRequest) parameters. (See TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::build()) If no parameter is found, RequestBuilder simply picks up the first controller and first action available under configured plugin. (See TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::loadDefaultValues()).

Am I wrong, or is there something am missing or is this by design and how can one go about defining controller action via TypoScript?

Thanx.

Actions

Also available in: Atom PDF