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

Adrien Crivelli adrien.crivelli at gmail.com
Fri Jun 15 10:58:08 CEST 2012


Indeed their configurations are not loaded. Or to be precise, only
configuration for the current extension from current plugin is loaded. Even
though the TypoScript of both extensions are "included static" in my
template record in Backend. And I also use the following in ext_tables.php:

t3lib_extMgm::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT:
source="ext2/Configuration/TypoScript/setup.txt">');
t3lib_extMgm::addTypoScriptConstants('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:
ext2/Configuration/TypoScript/constants.txt">');

So as far I understand TypoScript for both extensions should actually be
included twice. However that does not seem to help ExtBase when he needs to
look up configuration for mapping. Because he just doesn't even try to load
configuration for ext2.

If you can tell me how I should do to debug and confirm whether TypoScript
are at least theoretically available to ExtBase. And what order I should
use. I'll gladly do it.

Cheers,

Adrien



On 15 June 2012 16:41, Daniel Schöne <daniel at schoene.it> wrote:

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


More information about the TYPO3-project-typo3v4mvc mailing list