Question

I added some flash messages to some templates but they do not show up after a redirect. Existing templates (created by extension builder) already have this feature and it works fine there but on the templates where I added the exact same code and tag it does not work. besides adding code like so to my controllers validatethisAction method:

/**
* action validatethis
*
* @return void
*/
public function validatethisAction(  ) {
   ... //various checks
   $this->flashMessageContainer->add('Valid.');
   $this->redirect('validate_success');
}

and a tag like so to the validate_success template

<f:flashMessages />

what more is there to making flash messages work?

I am using typo3 v4.5.3 with extbase 1.3

Was it helpful?

Solution

ok, found the issue just by chance:

If I assign an object to be rendered on my view then flashmessages start to show.
for example :

$this->flashMessageContainer->add('Valid.');
$this->view->assign('coupon', $coupon);
$this->redirect('validate_success');

Now the flash message shows, without the assign line - nothing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top