题
我在Symfony的年代日10 Jobeet的教程。一切工作很好,但是当我试图去索引页:的http://本地主机:9090 / frontend_dev.php
我得到以下信息:
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仍然有9天的备份,并在索引页正常工作)。
任何建议?
解决方案
我想,而不是简单地增加他们你已经取代了应用程序/模块/工作/的actions.class.php方法与你在第10天发现了什么。如果你想在/工作的东西必须有这个文件的executeIndex()方法
其他提示
是的,它是这样的:
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)
{
...
}
...
}
我也有覆盖它。耶所以的 executeIndex 和<强> executeShow 强>是 “索引” 和 “显示” 重要。 ;)
不隶属于 StackOverflow