Bug #9416
Problems with own components
| Status: | Resolved | Start date: | 2010-08-23 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
All self written components (like the email blacklist posted here: http://forge.typo3.org/issues/8174) does not work anymore (worked in version 0.9.7) neither used as initInterceptors or saveInterceptors. Tested with current trunk and 0.9.8.
error message:
Caught exception: No valid implementation class for component "Tx_Formhandler_Interceptor_BlacklistEmailTLD" found while building the component object (Class "Tx_Formhandler_Interceptor_BlacklistEmailTLD" does not exist). File: /var/html/xxx/typo3conf/ext/formhandler/Classes/Component/Tx_GimmeFive_Component_Manager.php(130)
I checked documentation but it seems there are no changes.
I cannot check issue 7071 (http://forge.typo3.org/issues/7071) as far as this issue isnt solved.
History
Updated by Reinhard Führicht almost 3 years ago
- Status changed from New to Needs Feedback
Sorry, but I can't reproduce with current trunk.
My TS:
plugin.Tx_Formhandler.settings.predef.contact {
additionalIncludePaths.1 = fileadmin/templates/scripts/
...
initInterceptors {
1.class = Interceptor_AddValues
}
...
}
My interceptor:
class Tx_Formhandler_Interceptor_AddValues extends Tx_Formhandler_AbstractInterceptor {
/**
* The main method called by the controller
*
* @return array The probably modified GET/POST parameters
*/
public function process() {
$this->gp['test'] = 'test';
$this->gp['test1'] = 'test1';
return $this->gp;
}
}
Updated by Felix Nagel almost 3 years ago
Our TS config:
plugin.Tx_Formhandler.settings.additionalIncludePaths.1 = fileadmin/templates/v3.0/typoscript/plugins/formhandler/Classes
plugin.Tx_Formhandler.settings.predef.kontakt {
...
This worked great in version <0.9.7 and is the described in the documentation on line 45.
Seems to be working when I use TS config like you posted:
plugin.Tx_Formhandler.settings.predef.kontakt {
additionalIncludePaths.1 = fileadmin/templates/v3.0/typoscript/plugins/formhandler/Classes
...
The manual should be updated and it would be nice if there would be an update guide to avoid problems like this.
Updated by Reinhard Führicht almost 3 years ago
- Status changed from Needs Feedback to Resolved
I added information to the manual and changed the behaviour so that the additionalIncludePaths settings on global and predef level get merged, not overwritten.
Committed to trunk.
Index: Classes/Component/Tx_GimmeFive_Component_Manager.php
===================================================================
--- Classes/Component/Tx_GimmeFive_Component_Manager.php (revision 37120)
+++ Classes/Component/Tx_GimmeFive_Component_Manager.php (working copy)
@@ -57,6 +57,7 @@
* Loads the TypoScript config/setup for the formhandler on the current page.
*/
private function loadTypoScriptConfig() {
+ $conf = array();
if(!is_array(Tx_Formhandler_Globals::$overrideSettings['settings.'])) {
$sysPageObj = t3lib_div::makeInstance('t3lib_pageSelect');
if(!$GLOBALS['TSFE']->sys_page) {
@@ -68,17 +69,19 @@
$TSObj->init();
$TSObj->runThroughTemplates($rootLine);
$TSObj->generateConfig();
- $conf = $TSObj->setup['plugin.']['Tx_Formhandler.']['settings.'];
- } else {
- $conf = Tx_Formhandler_Globals::$overrideSettings['settings.'];
+ if($TSObj->setup['plugin.']['Tx_Formhandler.']['settings.']['additionalIncludePaths.']) {
+ $conf = $TSObj->setup['plugin.']['Tx_Formhandler.']['settings.']['additionalIncludePaths.'];
+ }
+ } elseif(Tx_Formhandler_Globals::$overrideSettings['settings.']['additionalIncludePaths.']) {
+ $conf = Tx_Formhandler_Globals::$overrideSettings['settings.']['additionalIncludePaths.'];
}
- if(Tx_Formhandler_Globals::$predef && is_array($conf['predef.'][Tx_Formhandler_Globals::$predef])) {
- $conf = $conf['predef.'][Tx_Formhandler_Globals::$predef];
+ if(Tx_Formhandler_Globals::$predef && is_array($conf['predef.'][Tx_Formhandler_Globals::$predef]['additionalIncludePaths.'])) {
+ $conf = array_merge($conf, $conf['predef.'][Tx_Formhandler_Globals::$predef]['additionalIncludePaths.']);
}
- $this->tsConf = $conf;
+ $this->additionalIncludePaths = $conf;
}
/**
@@ -377,8 +380,8 @@
}
- if(is_array($this->tsConf['additionalIncludePaths.'])) {
- foreach($this->tsConf['additionalIncludePaths.'] as $dir) {
+ if(is_array($this->additionalIncludePaths)) {
+ foreach($this->additionalIncludePaths as $dir) {
$temp = array();
$temp = $this->buildArrayOfClassFiles($dir);
Updated by Felix Nagel almost 3 years ago
Nice -- now both configuration work like a charm. THX!