-1

I am working on a legacy application, and I am facing an error when I add a new user. Everything is ok when updating the user.

The error is:

[error] [exception.CException] exception 'CException' with message 'Property "User. password" is not defined.' in D:\xampp\htdocs\yii-1.1.16\framework\base\CComponent.php:130
Stack trace:
#0 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(145): CComponent->__get(' password')
#1 D:\xampp\htdocs\yii-1.1.16\framework\validators\CRequiredValidator.php(58): CActiveRecord->__get(' password')
#2 D:\xampp\htdocs\yii-1.1.16\framework\validators\CValidator.php(201): CRequiredValidator->validateAttribute(Object(User), ' password')
#3 D:\xampp\htdocs\yii-1.1.16\framework\base\CModel.php(159): CValidator->validate(Object(User), NULL)
#4 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(808): CModel->validate(NULL)
#5 D:\xampp\htdocs\rz\protected\modules\admin\controllers\UserController.php(364): CActiveRecord->save()
#6 D:\xampp\htdocs\yii-1.1.16\framework\web\actions\CInlineAction.php(49): UserController->actionCreate()
#7 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(308): CInlineAction->runWithParams(Array)
#8 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#9 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilter.php(40): CFilterChain->run()
#10 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain))
#11 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain))
#12 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))
#13 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(291): CFilterChain->run()
#14 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#15 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(282): CController->run('create')
#16 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(141): CWebApplication->runController('admin/user/crea...')
#17 D:\xampp\htdocs\yii-1.1.16\framework\base\CApplication.php(184): CWebApplication->processRequest()
#18 D:\xampp\htdocs\rz\index.php(24): CApplication->run()
#19 {main}
REQUEST_URI=/rz/admin/user/create/?lang=en
Dharman
  • 30,962
  • 25
  • 85
  • 135
Luai
  • 9
  • 1
  • 3
    seems you have a space just before the `password` column name `"User. password" ` be sure you have not inadvertently added a space – ScaisEdge Jan 30 '20 at 09:44
  • You should definitely upgrade to latest version which is current 1.1.22 => https://www.yiiframework.com/news/267/yii-1-1-22-is-released – Damian Dziaduch Jan 31 '20 at 12:12

1 Answers1

0

The problem was solved when I upgraded Yii to 1.1.17 from 1.1.16

Regards

Luai
  • 9
  • 1