Answer the question
In order to leave comments, you need to log in
Yii: urlManager - why is the page not opening?
I decided to rewrite all routes to use a friendly URL, but with a double parameter, the page does not open.
The UrlManager has the following:
{
'catalog/<razdel:\w>/<idname:\w+>' => 'catalog/card',
'catalog/card/<idname:\w+>' => 'catalog/card',
'catalog/<idname:\w+>' => 'catalog/razdel',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<controller:\w+>/'=>'<controller>/index',
}
Class CatalogController extends FrontendController {
public function actionCard($idname, $razdel=''){
// тут мои действия
}
}
2014/04/01 00:42:47 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Системе не удалось найти запрашиваемое действие "fun".' in /Users/xxx/sites/framework/web/CController.php:483
Stack trace:
#0 /Users/xxx/sites/framework/web/CController.php(270): CController->missingAction('fun')
#1 /Users/xxx/sites/framework/web/CWebApplication.php(282): CController->run('fun')
#2 /Users/xxx/sites/framework/web/CWebApplication.php(141): CWebApplication->runController('catalog/fun/supe...')
#3 /Users/xxx/sites/framework/base/CApplication.php(180): CWebApplication->processRequest()
#4 /Users/xxx/sites/sitename.x/yii/protected/behaviors/WebApplicationEndBehavior.php(30): CApplication->run()
#5 [internal function]: WebApplicationEndBehavior->runEnd('frontend')
#6 /Users/xxx/sites/framework/base/CComponent.php(261): call_user_func_array(Array, Array)
#7 /Users/xxx/sites/sitename.x/yii/index.php(13): CComponent->__call('runEnd', Array)
#8 /Users/xxx/sites/sitename.x/yii/index.php(13): CWebApplication->runEnd('frontend')
#9 {main}
REQUEST_URI=/catalog/fun/supercard/
HTTP_REFERER=http://yii.sitename.x/catalog/fun/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question