[TYPO3-mvc] Scheduler & Extbase error of dispatcher controller

Lim Chivy chivy at web-essentials.asia
Sat Jan 22 04:02:56 CET 2011


On 1/18/2011 8:58 AM, Lim Chivy wrote:
> On 1/17/2011 6:04 PM, Franz Koch wrote:
>> Hey,
>>
>>> $dispatcher = new Tx_Extbase_Dispatcher();
>>> $dispatcher->dispatch('', $configuration);
>> ...
>>> I have checked the changlog of its extension, it has been changed in the
>>> Typoscript, but I don't know how to change it in my PHP code. Does
>>> anyone know how to make it works?
>>
>> The dispatcher is deprecated now. You should use the bootstrap instead:
>>
>> $bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
>> $bootstrap->run('', $configuration);
>>
>> Hope that solves your problem.
>
>
> Hi Franz Koch,
>
> I have used the bootstrap, but it sill shows another error and a PHP
> warning.
>
> PHP Warning: current() expects parameter 1 to be array, null given in
> C:\dev\web\introductionpackage\typo3\sysext\extbase\Classes\MVC\Web\RequestBuilder.php
> line 118
>
>
> Error:
> Execution of task "Schedule to check the articles (myextension)" failed
> with the following message: The controller name must be a valid string,
> boolean given.
>
>
> I appreciate it if you could solve this problem.
>
> Thanks,
> Chivy
>
>


Hi all,

I have put the configuration as bellow and I registered action in the 
the Backend Module then it works.

$configuration = array(
        'pluginName' => 'web_MyextentionM1',
        'extensionName' => 'Myextention',
        'switchableControllerActions' =>  array(
               'Article' => array(
                      'actions' => 'checkArticle'
               )
        )							
);
	
$bootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
$bootstrap->run('', $configuration);


If you don't have any action in the Backend module, it won't work. 
Because of the extBase function "getConfiguration" in the file 
"extbase/Classes/Configuration/AbstractConfigurationManager.php"(line 
123). It could not get the SwitchableControllerActions from you Backbend 
environment

$pluginConfiguration['controllerConfiguration'] = 
$this->getSwitchableControllerActions($this->extensionName, 
$this->pluginName);

Then your configuration "switchableControllerActions" cannot overwrite 
in function "overrideSwitchableControllerActions"(line185) if the 
default controler is empty.

Regards,
Chivy



More information about the TYPO3-project-typo3v4mvc mailing list