Yii Framework Forum: Unable to Populate Owner and Requester ID in Drop Down List - Yii Framework Forum

Jump to content

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

Unable to Populate Owner and Requester ID in Drop Down List Unable to Populate Drop Down List

#1 User is offline   V Srinivasa Raju 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 11-January 11
  • Location:Visakhapatnam, India

Posted 19 March 2011 - 08:38 PM

Hi Experts !!!
I am new to Yii , i have been working with Yii from last 1 month. In the process of learning Yii Track star application, all the examples given were working perfectly. some how i could not populate the requester and owner drop down list. i have followed all the instructions as per the book. Any one can help me in this issue. i am getting this error

PHP Error

Description

include(User.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

Source File

D:\wamp\www\yii\framework\YiiBase.php(395)

00383: * @return boolean whether the class has been loaded successfully
00384: */
00385: public static function autoload($className)
00386: {
00387: // use include so that the error PHP file may appear
00388: if(isset(self::$_coreClasses[$className]))
00389: include(YII_PATH.self::$_coreClasses[$className]);
00390: else if(isset(self::$classMap[$className]))
00391: include(self::$classMap[$className]);
00392: else
00393: {
00394: if(strpos($className,'\\')===false)
00395: include($className.'.php');
00396: else // class name with namespace in PHP 5.3
00397: {
00398: $namespace=str_replace('\\','.',ltrim($className,'\\'));
00399: if(($path=self::getPathOfAlias($namespace))!==false)
00400: include($path.'.php');
00401: else
00402: return false;
00403: }
00404: return class_exists($className,false) || interface_exists($className,false);
00405: }
00406: return true;
00407: }
Stack Trace

#0 D:\wamp\www\yii\framework\YiiBase.php(395): autoload()
#1 unknown(0): autoload()
#2 D:\wamp\www\yii\framework\db\ar\CActiveRecord.php(352): spl_autoload_call()
#3 D:\wamp\www\yii\framework\db\ar\CActiveFinder.php(217): model()
#4 D:\wamp\www\yii\framework\db\ar\CActiveFinder.php(51): CActiveFinder->buildJoinTree()
#5 D:\wamp\www\yii\framework\db\ar\CActiveRecord.php(239): CActiveFinder->__construct()
#6 D:\wamp\www\yii\framework\db\ar\CActiveRecord.php(108): Project->getRelated()
#7 D:\wamp\www\anits\protected\models\Project.php(82): Project->__get()
#8 D:\wamp\www\anits\protected\views\issue\_form.php(42): Project->getUserOptions()
#9 D:\wamp\www\yii\framework\web\CBaseController.php(119): require()
#10 D:\wamp\www\yii\framework\web\CBaseController.php(88): IssueController->renderInternal()
#11 D:\wamp\www\yii\framework\web\CController.php(833): IssueController->renderFile()
#12 D:\wamp\www\anits\protected\views\issue\create.php(15): IssueController->renderPartial()
#13 D:\wamp\www\yii\framework\web\CBaseController.php(119): require()
#14 D:\wamp\www\yii\framework\web\CBaseController.php(88): IssueController->renderInternal()
#15 D:\wamp\www\yii\framework\web\CController.php(833): IssueController->renderFile()
#16 D:\wamp\www\yii\framework\web\CController.php(746): IssueController->renderPartial()
#17 D:\wamp\www\anits\protected\controllers\IssueController.php(112): IssueController->render()
#18 D:\wamp\www\yii\framework\web\actions\CInlineAction.php(57): IssueController->actionCreate()
#19 D:\wamp\www\yii\framework\web\CController.php(300): CInlineAction->run()
#20 D:\wamp\www\yii\framework\web\filters\CFilterChain.php(133): IssueController->runAction()
#21 D:\wamp\www\anits\protected\controllers\IssueController.php(41): CFilterChain->run()
#22 D:\wamp\www\yii\framework\web\filters\CInlineFilter.php(59): IssueController->filterProjectContext()
#23 D:\wamp\www\yii\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter()
#24 D:\wamp\www\yii\framework\web\filters\CFilter.php(41): CFilterChain->run()
#25 D:\wamp\www\yii\framework\web\CController.php(1084): CAccessControlFilter->filter()
#26 D:\wamp\www\yii\framework\web\filters\CInlineFilter.php(59): IssueController->filterAccessControl()
#27 D:\wamp\www\yii\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter()
#28 D:\wamp\www\yii\framework\web\CController.php(283): CFilterChain->run()
#29 D:\wamp\www\yii\framework\web\CController.php(257): IssueController->runActionWithFilters()
#30 D:\wamp\www\yii\framework\web\CWebApplication.php(324): IssueController->run()
#31 D:\wamp\www\yii\framework\web\CWebApplication.php(121): CWebApplication->runController()
#32 D:\wamp\www\yii\framework\base\CApplication.php(135): CWebApplication->processRequest()
#33 D:\wamp\www\anits\index.php(13): CWebApplication->run()
0

#2 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 19 March 2011 - 08:41 PM

you try to use an "User" model that is either not imported or not exists
--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
0

#3 User is offline   V Srinivasa Raju 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 11-January 11
  • Location:Visakhapatnam, India

Posted 19 March 2011 - 08:48 PM

View PostGustavo, on 19 March 2011 - 08:41 PM, said:

you try to use an "User" model that is either not imported or not exists


I could not get you. can you elaborate the issue.
0

#4 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 19 March 2011 - 09:03 PM

somewhere in your code you are using the "User" model, that you didn't create or is not imported

to create a model you can use Gii code generator

to import a folder, so you can use its classes, do this:
//components/config/main.php
'import'=>array(
    	//base models
		'application.models.*',
    	//base components
    	'application.components.*',
    	//some other folder
    	'application.other.folder.*'
	),
//to import 1 file outside config
Yii::import('application.myFolder.myFile');
//to import a folder outside config
Yii::import('application.myFolder.*');

to use imported files the name of the file must be the same of the class
like the class User must be called "User.php"


I hope this clarify things a bit for you
--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
0

#5 User is offline   V Srinivasa Raju 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 11-January 11
  • Location:Visakhapatnam, India

Posted 19 March 2011 - 09:10 PM

Oh!!!!!!!!!!!
I did not create user model, i created it and i got the issue solves
thanks a lot.
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