Yii Framework Forum: redirect in CAtion class! - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

redirect in CAtion class! See page 59 in the book!

#1 User is offline   Mikewolf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 04-January 12

Posted 11 January 2012 - 04:29 PM

See page 59 in the book, there are some code to explain using external actions

in the e.g.

if($post->delete()) {
     $this->redirect('post/index');
}


I try it, and always get 500 popup dialog by Firefox even the post has been deleted from DB. So maybe use

Yii::app()->request->redirect('post/index');


instead of it will be better?

Or?
Newbee of Yii
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 12 January 2012 - 03:24 AM

Correct. This error is already at errata page http://yiicookbook.org/errata

Thanks for reporting.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   Mikewolf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 04-January 12

Posted 23 January 2012 - 03:55 PM

View Postsamdark, on 12 January 2012 - 03:24 AM, said:

Correct. This error is already at errata page http://yiicookbook.org/errata

Thanks for reporting.


thx, I will then first check there, then come here ask questions. :)
Newbee of Yii
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users