我在backend/modules/ordini/actions/actions.class.php中創建了一個名爲executeDetagli()的新動作。嘗試在後端模塊中創建新操作:「操作」模塊/ show「不存在」。
當我嘗試去 「backend_dev.php/ordini/detagli」 這給了我這個錯誤:
404 | Not Found | sfError404Exception Action "ordini/show" does not exist. stack trace
* at() in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfController.class.php
line 192 ... 189. $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Action "%s/%s" does not exist', $moduleName, $actionName)))); 190. } 191.
192. throw new sfError404Exception(sprintf('Action
"%s/%s" does not exist.', $moduleName, $actionName)); 193. } 194.
195. // create an instance of the action * at sfController->forward('ordini',
'show') in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfFrontWebController.class.php line 48 ... 45. } 46.
47. // make the first request 48. $this->forward($moduleName,
$actionName); 49. } 50. catch (sfException $e) 51. { * at sfFrontWebController->dispatch() in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php line 170 ... 167. */ 168. public function dispatch() 169. { 170. $this->getController()->dispatch(); 171. } 172.
173. /** * at sfContext->dispatch() in SF_ROOT_DIR/web/backend_dev.php line
13 ... 10. require_once(dirname(FILE).'/../config/ProjectConfiguration.class.php'); 11.
12. $configuration = ProjectConfiguration::getApplicationConfiguration('backend',
'dev', true); 13. sfContext::createInstance($configuration)->dispatch(); 14.
我在routing.yml中有這樣的:
shop_order:
class: sfPropelRouteCollection
options:
model: ShopOrder
module: ordini
prefix_path: /ordini
column: orders_id
with_wildcard_routes: true
default:
url: /:module/:action/*
任何想法?
SF 1.4 /推進
哈維
我這樣做,但它不起作用。 – ziiweb 2010-12-07 19:51:55