문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top