Yii Framework Forum: Undefined variable: issueDataProvider - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Undefined variable: issueDataProvider

#1 User is offline   gork4life 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-April 12

Posted 20 April 2012 - 12:37 AM

I'm new to Yii and I can't seem to get past this little error that I'm getting. I'm working through the Agile Yii Development book and I'm recieving this error. Undefined variable: issueDataProvider

Here's the stack trace.

#0
+
/var/www/yii/framework/web/CBaseController.php(127): require("/var/www/TrackStar/protected/views/project/_view.php")
#1
+
/var/www/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/var/www/TrackStar/protected/views/project/_view.php", array("index" => 0, "data" => Project, "widget" => CListView), true)
#2
+
/var/www/yii/framework/web/CController.php(870): CBaseController->renderFile("/var/www/TrackStar/protected/views/project/_view.php", array("index" => 0, "data" => Project, "widget" => CListView), true)
#3
+
/var/www/yii/framework/zii/widgets/CListView.php(242): CController->renderPartial("_view", array("index" => 0, "data" => Project, "widget" => CListView))
#4
+
/var/www/yii/framework/zii/widgets/CBaseListView.php(158): CListView->renderItems()
#5
unknown(0): CBaseListView->renderSection(array("{items}", "items"))
#6
+
/var/www/yii/framework/zii/widgets/CBaseListView.php(141): preg_replace_callback("/{(\w+)}/", array(CListView, "renderSection"), "{summary} {sorter} {items} {pager}")
#7
+
/var/www/yii/framework/zii/widgets/CBaseListView.php(126): CBaseListView->renderContent()
#8
+
/var/www/yii/framework/web/CBaseController.php(174): CBaseListView->run()
#9

/var/www/TrackStar/protected/views/project/index.php(17): CBaseController->widget("zii.widgets.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "_view"))

12 <h1>Projects</h1>
13
14 <?php $this->widget('zii.widgets.CListView', array(
15 'dataProvider'=>$dataProvider,
16 'itemView'=>'_view',
17 )); ?>

#10
+
/var/www/yii/framework/web/CBaseController.php(127): require("/var/www/TrackStar/protected/views/project/index.php")
#11
+
/var/www/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/var/www/TrackStar/protected/views/project/index.php", array("dataProvider" => CActiveDataProvider), true)
#12
+
/var/www/yii/framework/web/CController.php(870): CBaseController->renderFile("/var/www/TrackStar/protected/views/project/index.php", array("dataProvider" => CActiveDataProvider), true)
#13
+
/var/www/yii/framework/web/CController.php(783): CController->renderPartial("index", array("dataProvider" => CActiveDataProvider), true)
#14

/var/www/TrackStar/protected/controllers/ProjectController.php(144): CController->render("index", array("dataProvider" => CActiveDataProvider))

139 public function actionIndex()
140 {
141 $dataProvider=new CActiveDataProvider('Project');
142 $this->render('index',array(
143 'dataProvider'=>$dataProvider,
144 ));
145 }
146
147 /**
148 * Manages all models.
149 */

#15
+
/var/www/yii/framework/web/actions/CInlineAction.php(50): ProjectController->actionIndex()
#16
+
/var/www/yii/framework/web/CController.php(309): CInlineAction->runWithParams(array("r" => "project"))
#17
+
/var/www/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)
#18
+
/var/www/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#19
+
/var/www/yii/framework/web/CController.php(1146): CFilter->filter(CFilterChain)
#20
+
/var/www/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)
#21
+
/var/www/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain)
#22
+
/var/www/yii/framework/web/CController.php(292): CFilterChain->run()
#23
+
/var/www/yii/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array("accessControl"))
#24
+
/var/www/yii/framework/web/CWebApplication.php(276): CController->run("")
#25
+
/var/www/yii/framework/web/CWebApplication.php(135): CWebApplication->runController("project")
#26
+
/var/www/yii/framework/base/CApplication.php(162): CWebApplication->processRequest()
#27

/var/www/TrackStar/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();


please help I'm really stuck right here.
0

#2 User is offline   gork4life 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-April 12

Posted 21 April 2012 - 06:29 PM

I still haven't gotten this problem straightened out please.
0

#3 User is offline   Andreeew 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 07-September 12

Posted 07 September 2012 - 07:55 AM

I had a same error, because i put this code

"<br />

<h1>Project Issues</h1>

<?php $this->widget('zii.widgets.CListView', array(
'dataProvider' => $issueDataProvider,
'itemView'=>'/issue/_view',
)); ?>"

into the end of /protected/views/project/_view.php
instead of /protected/views/project/view.php
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users