This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » forward404Unless() problem
forward404Unless() problem [message #102588] Fri, 16 July 2010 13:41 Go to previous message
el-sid  is currently offline el-sid
Messages: 64
Registered: September 2009
Location: Nairobi, Kenya
Member

Hi,

i am trying to redirect by action when it returns an empty result set using foward404Unless(). the problem is it doesnt seem to have any effect. It just brings me a page without the content

in my action i have this
public function executeIndex(sfWebRequest $request) {

        $this->articles = Doctrine_Core::getTable('Articles')->getArticles($request->getParameter('id'));

        $this->forward404Unless($this->articles);
    }


this method is retrieved from the table as follows

 public function getArticle($id) {

        $q = $this->createQuery('a')
                        ->where('a.id =?', $id);

        return $q->execute();
    }



anyone knows how to fix this?

Thanks

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Error detected in sfValidatorDate
Next Topic:admin generator language
Goto Forum:

  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software