You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leuchtfeuer\Locate\Middleware\LanguageRedirectMiddleware reads typoscript settings like this $typoScript = $this->backendConfigurationManager->getTypoScriptSetup();
Reading typoscript frontend settings with the backendConfigurationManager results in unexpected behaviour with typoscript like this:
The condition if (isset($typoScript['config.']['tx_locate']) && (int)$typoScript['config.']['tx_locate'] === 1) {}
in LanguageRedirectMiddleware always returns true (config.tx_locate will always be 1), no matter what typoscript settings are configured. Maybe the reson is a changed behaviour in BackendConfigurationManager for TYPO3 v12. I did not dig deeper into this because there is a better, working solution:
If the typoscript setting will be read with the normal ConfigurationManager like this, it works just fine again:
As far as I see, the BackendConfigurationManager is not really supposed to read frontend typoscript code anyway. See comment at the start of the class:
/*
* Load TypoScript of a page in backend mode.
*
* Extbase Backend modules can be configured with Frontend TypoScript. This is of course a very
* bad thing, but it is how it is ^^ (we'll get rid of this at some point, promised!)
*/
To Reproduce
Steps to reproduce the behavior:
Try to read fronten typoscript settings with the BackendConfigurationManager in Leuchtfeuer\Locate\Middleware\LanguageRedirectMiddleware
I hope I did not miss anything an will create a pull request.
Regards and thanks for a great and usefull extension!!
Mike
The text was updated successfully, but these errors were encountered:
Describe the bug
Leuchtfeuer\Locate\Middleware\LanguageRedirectMiddleware reads typoscript settings like this
$typoScript = $this->backendConfigurationManager->getTypoScriptSetup();
Reading typoscript frontend settings with the backendConfigurationManager results in unexpected behaviour with typoscript like this:
The condition
if (isset($typoScript['config.']['tx_locate']) && (int)$typoScript['config.']['tx_locate'] === 1) {}
in LanguageRedirectMiddleware always returns true (config.tx_locate will always be 1), no matter what typoscript settings are configured. Maybe the reson is a changed behaviour in BackendConfigurationManager for TYPO3 v12. I did not dig deeper into this because there is a better, working solution:
If the typoscript setting will be read with the normal ConfigurationManager like this, it works just fine again:
As far as I see, the BackendConfigurationManager is not really supposed to read frontend typoscript code anyway. See comment at the start of the class:
To Reproduce
Steps to reproduce the behavior:
Try to read fronten typoscript settings with the BackendConfigurationManager in Leuchtfeuer\Locate\Middleware\LanguageRedirectMiddleware
I hope I did not miss anything an will create a pull request.
Regards and thanks for a great and usefull extension!!
Mike
The text was updated successfully, but these errors were encountered: