#91723Extbase configuration loader and/or AbstractController loads wrong configuration
Description
The method getPluginConfiguration in the class FrontendConfigurationManager just fetches plugin.tx_plugin.settings – it does not care about having multiple typeNum. For example:
anotherPageObject < lib.basePageObject
anotherPageObject {
typeNum = 123
// 10 is the plugin
10 {
settings {
foo = bar
}
}
}
If I visit the same site on ?type=123 I only get the base settings, not the settings for this typeNum = 123.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
S P commented 06/29/20, 11:00
-
S P commented 06/29/20, 11:17
I’m not sure what the intention of this configuration spaghetti is, but the problem could also be that AbstractController loads the settings without
$extensionNameand$pluginName:$this->settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);This eventually triggers the if clause and overwrites the plugin settings with the global settings.
-
S P changed subject
Extbase configuration loader for settings does not respect typeNumExtbase configuration loader and/or AbstractController loads wrong configuration 06/29/20, 11:19 -
S P commented 07/03/20, 13:22
Another onion layer adds to this whole spaghetti: the configuration gets cached in
getConfiguration(), but only by extension and plugin names:$configurationCacheKey = strtolower(($extensionName ?: $this->extensionName) . '_' . ($pluginName ?: $this->pluginName)); if (isset($this->configurationCache[$configurationCacheKey])) { return $this->configurationCache[$configurationCacheKey]; }What if I have the same plugin multiple times on a page with different settings? Then always the config from the first will be loaded.
I debugegd this multiple days now and I simply can’t get past this method to return the correct configuration, no matter what I do (even though in the Template module in the Backend everything is shown fully correct, so the TypoScript itself is fine!)
-
S P commented 12/16/24, 11:25
Can be closed. Seems to work on v12.
-
Oliver Bartsch commented and changed status
NewClosed 12/16/24, 11:28I’m closing as author reported this to work for latest versions. In case anyone stumbles over this again, please create a new issue, linking to this one.
Did some further research. The problem is this in
getConfiguration:Up to this point everything is corect, but this writes the global
plugin.tx_over the already correct resolved settings. What is this for?Also there are no parantheses around the logical operators – is the condition regarding the evaluation order of || and && even correct?