CHttpException

The requested page does not exist.

/srv/vhosts/ymtcps.edu.hk/httpdocs/protected/controllers/SiteController.php(141)

129         $dataProvider->sort->defaultOrder = "publishDate DESC";
130         $dataProvider->criteria->limit = 5;
131 
132         Yii::app()->schoolWeb->defaultPageSize = 10;
133         $this->render('homework/index', array("dataProvider" => $dataProvider, "model" => $model));
134     }
135 
136     public function loadModel($name)
137     {
138         /** @var Pages $model */
139         $model = Pages::model()->findByAttributes(array('uniqueName' => $name));
140         if ($model === null || !$model->display)
141             throw new CHttpException(404, 'The requested page does not exist.');
142         return $model;
143     }
144 
145     public function actionContent($name)
146     {
147         $model = $this->loadModel($name);
148 
149         return $this->renderPartial('/layouts/page/_iframe_content', [
150             'content' => $model->getTranslation()->body
151         ]);
152     }
153 

Stack Trace

#0
+
 /srv/vhosts/ymtcps.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/ymtcps.edu.hk/httpdocs/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-19 11:47:25 Apache Yii Framework/1.1.21