I wasted whole day to find why after one of my actions default layout
flash message won't appear.


Here flash message appears correctly:

  function edit($id = null) {
    if (!empty($this->data)) {
      $this->Topic->set($this->data);

      if ($this->Topic->validates()) {
        if ($this->Topic->save($this->data, false)) {
                                $this->Session->setFlash('Data has been 
changed');
                                $this->redirect(array('action'=>'my_topics', 
$id), null, true);
                        }
                }
        }
        }


But here somehow it won't show, and there is no flash message in
$_SESSION:

        function add() {
                if (!empty($this->data)) {
                  if ($this->Auth->User('promoter_id')) {
                    $this->data['Topic']['fk_users_promoters'] = $this->Auth-
>User('promoter_id');
                    $this->data['Topic']['stan'] = 'D';

                  } elseif ($this->Auth->User('student_id')) {
                    $this->data['Topic']['fk_users_students'] = $this->Auth-
>User('student_id');
                    $this->data['Topic']['stan'] = 'P';
                  }
                  $this->data['Topic']['fk_specializations'] = $this->Auth-
>User('spec_id');
                  $this->data['Topic']['dodano'] = date('Y-m-d H:i:s');

                  $this->Topic->set($this->data);
                  if ($this->Topic->validates()) {
                        if ($this->Topic->save($this->data, false)) {
          $this->Session->setFlash('New data created');
          $this->redirect(array('action'=>'my_topics', $this->Topic-
>getLastInsertID()), null, true);
                        }
                }
                }
        }

Already tried to change security lvl and other simple solutions I
found in network but no luck...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to