CHttpException

The requested page does not exist.

/srv/vhosts/szetoho.edu.hk/httpdocs/protected/controllers/SiteController.php(126)

114         $dataProvider->sort->defaultOrder = "publishDate DESC";
115 
116         Yii::app()->schoolWeb->defaultPageSize = 10;
117         $this->render('homework/index', array("dataProvider" => $dataProvider, "model" => $model));
118     }
119 
120 
121     public function loadModel($name)
122     {
123         /** @var Pages $model */
124         $model = Pages::model()->findByAttributes(array('uniqueName' => $name));
125         if ($model === null || !$model->display)
126             throw new CHttpException(404, 'The requested page does not exist.');
127         return $model;
128     }
129 
130     public function actionContent($name)
131     {
132         $model = $this->loadModel($name);
133 
134         return $this->renderPartial('/layouts/page/_iframe_content', [
135             'content' => $model->getTranslation()->body,
136             'pageModel' => $model,
137         ]);
138     }

Stack Trace

#0
+
 /srv/vhosts/szetoho.edu.hk/httpdocs/protected/controllers/SiteController.php(43): SiteController->loadModel("辨學宗旨")
38 
39         if (!isset($_GET['name'])) {
40             $this->redirect('/');
41         }
42 
43         $model = $this->loadModel($_GET['name']);
44 
45         if (!empty($model->password)) {
46             if (isset($_POST['Pages'])
47                 && isset($_POST['Pages']['password'])
48                 && md5($_POST['Pages']['password']) == $model->password
#8
+
 /srv/vhosts/szetoho.edu.hk/httpdocs/index.php(17): CApplication->run()
12 // specify how many levels of call stack should be shown in each log message
13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14 
15 //require_once($autoload);
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2024-03-29 05:45:18 Apache Yii Framework/1.1.21