문제

I'm in the day 10 of Symfony's Jobeet Tutorial. Everything worked good, but when I tried to go to the index page: http://localhost:9090/frontend_dev.php

I got the following message:

 sfPatternRouting Match route "job" (/job.:sf_format) for /job with parameters array ( 'module' => 'job', 'action' => 'index', 'sf_format' => 'html',)
2 Info sfFrontWebController Action "job/index" does not exist
3 Error sfError404Exception Action "job/index" does not exist. 

(I still have a backup of day 9, and the index page works fine).

Any suggestions?

도움이 되었습니까?

해결책

I guess you have replaced the methods in app/modules/job/actions.class.php with what you found on day 10, instead of simply adding them. There must be an executeIndex() method in this file if you want to get something in /job

다른 팁

Yeah, it's something like this:

class jobActions extends sfActions
{
  public function executeIndex(sfWebRequest $request)
  {
    $this->categories = Doctrine_Core::getTable('JobeetCategory')->getWithJobs();
  }

  public function executeShow(sfWebRequest $request)
  {
    $this->job = $this->getRoute()->getObject();
  }

  public function executeNew(sfWebRequest $request)
  {
    ...
  }
  ...
}

I also had overwrite it. Yeah so executeIndex and executeShow are important for "index" and "show". ;)

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