CException "zii.widget.CListView" is invalid

hey guys, can anyone please explain to me what is wrong and how i fix this?


CException


Alias "zii.widget.CListView" is invalid. Make sure it points to an existing PHP file.


/Applications/MAMP/htdocs/yiiroot/framework/YiiBase.php(318)


306         if($isClass && (class_exists($className,false) || interface_exists($className,false)))

307             return self::$_imports[$alias]=$className;

308 

309         if(($path=self::getPathOfAlias($alias))!==false)

310         {

311             if($isClass)

312             {

313                 if($forceInclude)

314                 {

315                     if(is_file($path.'.php'))

316                         require($path.'.php');

317                     else

318                         throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file.',array('{alias}'=>$alias)));

319                     self::$_imports[$alias]=$className;

320                 }

321                 else

322                     self::$classMap[$className]=$path.'.php';

323                 return $className;

324             }

325             else  // a directory

326             {

327                 if(self::$_includePaths===null)

328                 {

329                     self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));

330                     if(($pos=array_search('.',self::$_includePaths,true))!==false)

Stack Trace

#0	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CWidgetFactory.php(147): YiiBase::import("zii.widget.CListView", true)

#1	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CBaseController.php(147): CWidgetFactory->createWidget(PClassController, "zii.widget.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "/guide/_view"))

#2	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CBaseController.php(173): CBaseController->createWidget("zii.widget.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "/guide/_view"))

#3	

–  /Applications/MAMP/htdocs/Pgamers/protected/views/pclass/view.php(34): CBaseController->widget("zii.widget.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "/guide/_view"))

29 <h1>Guides</h1>

30 

31 <?php $this->widget('zii.widget.CListView', array(

32     'dataProvider'=>$guideDataProvider,

33     'itemView'=>'/guide/_view',

34 )); ?>

#4	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CBaseController.php(127): require("/Applications/MAMP/htdocs/pgamers/protected/views/pclass/view....")

#5	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CBaseController.php(96): CBaseController->renderInternal("/Applications/MAMP/htdocs/pgamers/protected/views/pclass/view....", array("model" => PClass, "guideDataProvider" => CActiveDataProvider), true)

#6	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(870): CBaseController->renderFile("/Applications/MAMP/htdocs/pgamers/protected/views/pclass/view....", array("model" => PClass, "guideDataProvider" => CActiveDataProvider), true)

#7	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(783): CController->renderPartial("view", array("model" => PClass, "guideDataProvider" => CActiveDataProvider), true)

#8	

–  /Applications/MAMP/htdocs/pgamers/protected/controllers/PclassController.php(66): CController->render("view", array("model" => PClass, "guideDataProvider" => CActiveDataProvider))

61         ));

62 

63         $this->render('view',array(

64             'model'=>$this->loadModel($id),

65             'guideDataProvider'=>$guideDataProvider,

66         ));

67     }

68 

69 

70     /**

71      * Creates a new model.

#9	

 unknown(0): PClassController->actionView("1")

#10	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/actions/CAction.php(107): ReflectionMethod->invokeArgs(PClassController, array("1"))

#11	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/actions/CInlineAction.php(48): CAction->runWithParamsInternal(PClassController, ReflectionMethod, array("r" => "pclass/view", "id" => "1"))

#12	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(309): CInlineAction->runWithParams(array("r" => "pclass/view", "id" => "1"))

#13	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)

#14	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/filters/CFilter.php(41): CFilterChain->run()

#15	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(1146): CFilter->filter(CFilterChain)

#16	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)

#17	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain)

#18	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(292): CFilterChain->run()

#19	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array("accessControl"))

#20	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CWebApplication.php(276): CController->run("view")

#21	

+  /Applications/MAMP/htdocs/yiiroot/framework/web/CWebApplication.php(135): CWebApplication->runController("pclass/view")

#22	

+  /Applications/MAMP/htdocs/yiiroot/framework/base/CApplication.php(162): CWebApplication->processRequest()

#23	

–  /Applications/MAMP/htdocs/pgamers/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();

It should be ‘zii.widgets.CListView’. :)

oh my god, i was trying all sorts of different things for like 2 days before i wrote this thread. i’m feeling a bit stupid now…

but thank you so much, it worked perfectly :D