[TYPO3-mvc] Exception on missing configuration!?

Thomas Hempel thomas at typo3-unleashed.net
Wed Apr 29 09:25:22 CEST 2009


Hi,

I just started to look at extbase. I ran into trouble at the very 
beginning. The good thing is, it's not a bug in extbase. But some sort 
of usability issue or missing feature of some sort.

I started to setup a installation from trunk and copied extbase to 
sysext folder. Checked out the BlogExample and fluid, added plugins and 
called the FE.

I got some output but also an PHP exception because some array couldn't 
be merged inside extbase. So I started to debug that and after some time 
I ended up with a missing TypoScript template.

Very dump mistake which can be fixed very fast if extbase would throw 
some speaking exception or handle this a bit more relaxed.

With my little knowledge about the system, I would say that this can be 
fixed very easy in Tx_Extbase_Configuration_Source_TypoScriptSource->load.

public function load($extensionName) {
	$settings = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . 
strtolower($extensionName) . '.'];
	if (is_array($settings)) $settings = $this->postProcessSettings($settings);
	return $settings;
}

If $settings is "null" it should throw an exception that now 
configuration was found or return an empty array instead of "null". The 
reson for this is, that the result of this method is directly piped into 
the t3lib_div::array_merge_recursive_overrule which eventually leads 
into an PHP exception if no TS template is available.

I didn't looked at the other configuration classes but there might be 
similiar problems. On the other hand I don't know if the other ones are 
mandatory.

I didn't filed this on forge yet because I don't know if this is really 
a missing feature or not. But in my eyes, the reaction on a missing TS 
is not very good.


Greets,
Thomas

--
http://www.typo3-unleashed.net
Twitter: thomas_typo3


More information about the TYPO3-project-typo3v4mvc mailing list