Bug #96371
closed
Strange error with custom Frontend AuthenticationService in TYPO3 11 TLS
Added by Markus Pircher almost 3 years ago.
Updated about 1 year ago.
Description
I have a custom AuthenticationService in my extension (subtypes: getUserFE,authUserFE), which I have been using since v8 TLS and which also works fine in v9 and v10.
But with v11 I get an error, the service itself seems to work:
The default controller for extension "Felogin" and plugin "Login" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
Even if the debug log says that I was successfully logged in and that a session was created, I am not logged in after reloading the login form.
I load configurations from ConfigurationManager, maybe that's the problem?
I thought before that the problem was something else (#95580)
Apparently the BackendConfigurationManager is being created here, and so the controller/action information is missing.
- Status changed from New to Needs Feedback
Interesting, are you loading the Extbase context out of the Authentication service? I guess at this point we don't have the "id" (= which page is selected) information yet. Do you have any special Route Enhancers?
- Related to Bug #95580: Wrong ConfigurationManager in Frontend Ajax call added
The problem lies in TYPO3\CMS\Extbase\Configuration\ConfigurationManager->initializeConcreteConfigurationManager
At the time of authentication, the $GLOBALS['TYPO3_REQUEST'] object does not exist, which is why the BackendConfigurationManager is used.
In the meantime I have refactored my service so that I no longer need the configuration manager and moved the settings from Typescript to extension settings.
- Status changed from Needs Feedback to Closed
Hey. I hope it's ok to close here for now: using the extbase frontend configuration manager within an auth service is probably not a really great idea - using FE TS in authentication-chain in general probably isn't. Seems you solved you issue differently meanwhile, so it's hopefully ok to close here since core should not support this, imho.
I notice in TYPO3 11 if I use repositories in AuthenticationService getUser(), I get the error
The controller "Login" is not allowed by plugin "Login". Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
This worked fine in 9.5
Took me some time to figure this out. Had no choice than to rebuild the whole process with queryBuilder.
Also I noticed that __construct doesn't work for repositories:
Too few arguments to function __construct(), 0 passed
Same problem for me with TYPO3 V11 but it was caused by using ConfigurationManagerInterface in constructor.
public function __construct(ConfigurationManagerInterface $configurationManager)
{
}
and also using StandaloneView or FluidEmail :
$view = GeneralUtility::makeInstance(StandaloneView::class);
Also available in: Atom
PDF