2012-05-17 57 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' 
    )); 

這就需要去之前,你的默認路由。