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

Daniel Schöne daniel at schoene.it
Fri Jun 15 09:41:45 CEST 2012


Hi Adrian,

seems like your extensions / their configuration are not loaded in the correct order.

cheers,
daniel

On 15.06.2012, at 09:26, Adrien Crivelli wrote:

> 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
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> 

-- 
Daniel Schöne



More information about the TYPO3-project-typo3v4mvc mailing list