[TYPO3-mvc] Extbase mapping configuration from another extension not loaded

Adrien Crivelli adrien.crivelli at gmail.com
Fri Jun 15 09:26:13 CEST 2012


Hi all,

I develop an extension, ext1, who uses models from ext2. It happens that
ext2 uses a special mapping for tableName with the following syntax in
Configuration/TypoScript/setup.txt

plugin.tx_ext2 {
persistence {
storagePid = {$plugin.tx_ext2.persistence.storagePid}
classes.Tx_ext2_Domain_Model_Model2.mapping.tableName = fe_users
}
}

Now, in ext1, I have Model1 who has a collection of Model2 (from ext2). I
end up with fatal error whenever I load a Model1, because TYPO3 does not
load the configuration from ext2 and make queries on default tablename
"tx_ext2_model1" instead of mapped "fe_users".

This behavior can be confirmed when looking
at Tx_Extbase_Configuration_AbstractConfigurationManager::getConfiguration().
In our case it will merge the $frameworkConfiguration with the current
plugin configuration, by using $this->getPluginConfiguration(). This lead
us
to Tx_Extbase_Configuration_FrontendConfigurationManager::getPluginConfiguration()
who only load configuration from our current plugin, hence ext1, and never
do anything related with ext2.

I get it that loading all extensions configurations is not a wise thing to
do, but in this case that would seem quite useful to be able to load at
least the configuration of the extension where the Model come from, in
addition of the current plugin.

Or is it by design ? What do you think, does it make sense ?

Cheers,

Adrien


More information about the TYPO3-project-typo3v4mvc mailing list