[TYPO3-mvc] Fluid validation: how to debug errors?

Xavier Perseguers typo3 at perseguers.ch
Fri Sep 25 14:18:28 CEST 2009


Xavier Perseguers wrote:
> Hi Sebastian,
> 
>> do you use the newest Extbase version available in TYPO3 v4.3 trunk 
>> (and under coreProjects?)
>>
>> Please check that there is the 
>> Tx_Extbase_Validation_Validator_StringValidator available in your 
>> installation.
> 
> Problem is located in EXT:fluid/Classes/ViewHelpers/ForViewHelper.php. 
> In method render(), the parameter "as" is of type string (according to 
> the phpDoc). If I write this to my template:
> 
> <f:for each="{activities}" as="activity">
> 
> I get the mentioned error. If I change it to "mixed", then it works. 
> Funny because I use exactly the same "for" in another extension and this 
> works. Is it possible that the string validator from Extbase should be 
> somehow loaded in order for Fluid to run smoothly? Because I'm using 
> Fluid without really relying on Extbase in my case.

For sake of understanding, my extension is based on pibase and basically does this in main():


$renderer = t3lib_div::makeInstance('Tx_Fluid_View_TemplateView');
$renderer->setControllerContext(t3lib_div::makeInstance('Tx_Extbase_MVC_Controller_ControllerContext'));

$template = t3lib_extMgm::extPath($_EXTKEY) . 'Resources/Private/Templates/Activities/index.html';
$renderer->setTemplatePathAndFilename($template);

// snip: Retrieve some activities with ActivityRepository

$renderer->assign('activities', $activities);
return $renderer->render();

This worked great until recently. Now a dependency seems to have been introduced that prevents Fluid from being used outside of an Extbase controller.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-project-typo3v4mvc mailing list