CHttpException

The page can not be found.

/var/www/otido-shyba/data/www/app/apps/frontend/modules/news/controllers/NewsController.php(49)

37     }
38 
39     public  function actionElement($param){
40         $paramArr = explode("/", $param);
41         $paramArr =  array_pop($paramArr);
42         $paramArr = strtolower($paramArr);
43 
44         if (is_numeric($paramArr)){
45             $modelRubrics = array();
46             $pages = array();
47             $modelElements = NewsElements::model()->findByPk($paramArr);
48             $model = NewsRubrics::model()->findByPk($modelElements->parent_id);
49             if (!$modelElements){ throw new CHttpException(404,'The page can not be found.'); }
50             $this->setSEOData($modelElements);
51 
52             $pageArray = array();
53             $i = 0;
54             foreach ($model->ancestors()->findAll() as $data){
55                 if ($data->level == 1){continue;}
56                 $pageArray[$i]['url'] = $data->url;
57                 $pageArray[$i]['name'] = $data->name;
58                 ++$i;
59             }
60             $pageArray[$i]['url'] = $model->url;
61             $pageArray[$i]['name'] = $model->name;

Stack Trace

#12
+
 /var/www/otido-shyba/data/www/otido-shyba.ru/index.php(6): CApplication->run()
1 <?php
2 
3 require_once( __DIR__ . '/../app/config/settings.php' );
4 require_once( __DIR__ . '/../framework/yiilite.php');
5 
6 Yii::createWebApplication( __DIR__ . '/../app/config/frontend.php' )->run();
2024-03-28 22:45:15 Apache Yii Framework/1.1.18