Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CDbException
- CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'comments.status' in 'where clause'. The SQL statement executed was: SELECT `tblComments`.`id` AS `t1_c0`, `tblComments`.`content` AS `t1_c1`, `tblComments`.`status` AS `t1_c2`, `tblComments`.`create_time` AS `t1_c3`, `tblComments`.`author` AS `t1_c4`, `tblComments`.`email` AS `t1_c5`, `tblComments`.`url` AS `t1_c6`, `tblComments`.`post_id` AS `t1_c7` FROM `tbl_comment` `tblComments` WHERE (comments.status=2) AND (`tblComments`.`post_id`=:ypl0) ORDER BY comments.create_time DESC
- /var/www/surveyor/protected/views/post/view.php(20)
- 08 <?php $this->renderPartial('_view', array(
- 09 'data'=>$model,
- 10 )); ?>
- 11
- 12 <div id="comments">
- 13 <?php if($model->commentCount>=1): ?>
- 14 <h3>
- 15 <?php echo $model->commentCount>1 ? $model->commentCount . ' comments' : 'One comment'; ?>
- 16 </h3>
- 17
- 18 <?php $this->renderPartial('_comments',array(
- 19 'post'=>$model,
- 20 'comments'=>$model->tblComments,
- 21
- 22 )); ?>
- 23 <?php endif; ?>
- 24
- 25 <h3>Leave a Comment</h3>
- 26
- 27 <?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
- 28 <div class="flash-success">
- 29 <?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
- 30 </div>
- 31 <?php else: ?>
- 32 <?php $this->renderPartial('/comment/_form',array(
- Stack Trace
- #0
- + /var/www/yii/framework/db/CDbCommand.php(376): CDbCommand->queryInternal("fetchAll", array(2), array())
- #1
- + /var/www/yii/framework/db/ar/CActiveFinder.php(817): CDbCommand->queryAll()
- #2
- + /var/www/yii/framework/db/ar/CActiveFinder.php(526): CJoinElement->runQuery(CJoinQuery)
- #3
- + /var/www/yii/framework/db/ar/CActiveFinder.php(166): CJoinElement->lazyFind(Post)
- #4
- + /var/www/yii/framework/db/ar/CActiveRecord.php(258): CActiveFinder->lazyFind(Post)
- #5
- + /var/www/yii/framework/db/ar/CActiveRecord.php(126): CActiveRecord->getRelated("tblComments")
- #6
- – /var/www/surveyor/protected/views/post/view.php(20): CActiveRecord->__get("tblComments")
- 15 <?php echo $model->commentCount>1 ? $model->commentCount . ' comments' : 'One comment'; ?>
- 16 </h3>
- 17
- 18 <?php $this->renderPartial('_comments',array(
- 19 'post'=>$model,
- 20 'comments'=>$model->tblComments,
- 21
- 22 )); ?>
- 23 <?php endif; ?>
- 24
- 25 <h3>Leave a Comment</h3>
- #7
- + /var/www/yii/framework/web/CBaseController.php(119): require("/var/www/surveyor/protected/views/post/view.php")
- #8
- + /var/www/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal("/var/www/surveyor/protected/views/post/view.php", array("model" => Post, "comment" => Comment), true)
- #9
- + /var/www/yii/framework/web/CController.php(866): CBaseController->renderFile("/var/www/surveyor/protected/views/post/view.php", array("model" => Post, "comment" => Comment), true)
- #10
- + /var/www/yii/framework/web/CController.php(779): CController->renderPartial("view", array("model" => Post, "comment" => Comment), true)
- #11
- – /var/www/surveyor/protected/controllers/PostController.php(54): CController->render("view", array("model" => Post, "comment" => Comment))
- 49 $comment=$this->newComment($post);
- 50
- 51 $this->render('view',array(
- 52 'model'=>$post,
- 53 'comment'=>$comment,
- 54 ));
- 55 }
- 56
- 57 /**
- 58 * Creates a new model.
- 59 * If creation is successful, the browser will be redirected to the 'view' page.
- #12
- + /var/www/yii/framework/web/actions/CInlineAction.php(50): PostController->actionView()
- #13
- + /var/www/yii/framework/web/CController.php(300): CInlineAction->runWithParams(array("r" => "post/view", "id" => "5", "title" => "Test final"))
- #14
- + /var/www/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
- #15
- + /var/www/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
- #16
- + /var/www/yii/framework/web/CController.php(1122): CFilter->filter(CFilterChain)
- #17
- + /var/www/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)
- #18
- + /var/www/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
- #19
- + /var/www/yii/framework/web/CController.php(283): CFilterChain->run()
- #20
- + /var/www/yii/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array("accessControl"))
- #21
- + /var/www/yii/framework/web/CWebApplication.php(328): CController->run("view")
- #22
- + /var/www/yii/framework/web/CWebApplication.php(121): CWebApplication->runController("post/view")
- #23
- + /var/www/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()
- #24
- – /var/www/surveyor/index.php(13): CApplication->run()
- 08 defined('YII_DEBUG') or define('YII_DEBUG',true);
- 09 // specify how many levels of call stack should be shown in each log message
- 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
- 11
- 12 require_once($yii);
- 13 Yii::createWebApplication($config)->run();
- 2011-07-15 15:57:18 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement