2012-05-17 55 views
1

我在我的管理面板上使用Kohana 2。但是,当点击添加新按钮时,出现页面未找到警告。Kohana 2删除页面警告

其警告:

The requested page was not found. It may have moved, been deleted, or archived. 

panel/system/core/Kohana.php [842]: 

The page you requested, admin/corporate/addnew, could not be found. 

那842线:

throw new Kohana_404_Exception($page, $template); 

这一警告页面图像:

enter image description here

+0

你能告诉我们你的公司控制器吗?你有一个'addnew'方法,对吧?或者你是否将此路线重定向到另一个位置? – Sampson

+0

是有addnew方法。 – Karmacoma

回答

0

除非你有一个路由设置来处理这个特殊的URL,默认路由不会处理这个。 url“admin/corporate/addnew”试图使用管理员控制器,公司行为和一个名为“addnew”的ID。林不知道你是如何应用程序结构,但也许你需要写在你的bootstrap.php中的路线,看起来是这样的:

Route::set('admin_corporate', 'admin/corporate(/<action>(/<id>))') 
    ->defaults(array(
     'controller' => 'corporate', 
     'action'  => 'index' 
    )); 

这就需要去之前,你的默认路由。