Property "Complaint.creation_date" is not defined.

When I submit blank input in a form. It shows error Property “Complaint.creation_date” is not defined. I tried to change ‘created_date’ => ‘Creation Date’, to be ‘creation_date’ => ‘Creation Date’,

but it still shows error.

#0

C:\wamp\www\capa_monitoring\framework\db\ar\CActiveRecord.php(145): CComponent->__get("creation_date")

#1

C:\wamp\www\capa_monitoring\framework\web\helpers\CHtml.php(2729): CActiveRecord->__get("creation_date")

#2

C:\wamp\www\capa_monitoring\framework\web\helpers\CHtml.php(2452): CHtml::resolveValue(Complaint, "creation_date")

#3

C:\wamp\www\capa_monitoring\framework\web\helpers\CHtml.php(1534): CHtml::activeInputField("text", Complaint, "creation_date", array("name" => "Complaint[creation_date]", "id" => "Complaint_creation_date"))

#4

C:\wamp\www\capa_monitoring\framework\web\widgets\CActiveForm.php(792): CHtml::activeTextField(Complaint, "creation_date", array())

#5

C:\wamp\www\capa_monitoring\protected\views\complaint\_search.php(241): CActiveForm->textField(Complaint, "creation_date")

#6

C:\wamp\www\capa_monitoring\framework\web\CBaseController.php(126): require("C:\wamp\www\capa_monitoring\protected\views\complaint\_search.ph…")

#7

C:\wamp\www\capa_monitoring\framework\web\CBaseController.php(95): CBaseController->renderInternal("C:\wamp\www\capa_monitoring\protected\views\complaint\_search.ph…", array("model" => Complaint), true)

#8

C:\wamp\www\capa_monitoring\framework\web\CController.php(869): CBaseController->renderFile("C:\wamp\www\capa_monitoring\protected\views\complaint\_search.ph…", array("model" => Complaint), true)

#9

C:\wamp\www\capa_monitoring\protected\views\complaint\admin.php(39): CController->renderPartial("_search", array("model" => Complaint))

#10

C:\wamp\www\capa_monitoring\framework\web\CBaseController.php(126): require("C:\wamp\www\capa_monitoring\protected\views\complaint\admin.php")

#11

C:\wamp\www\capa_monitoring\framework\web\CBaseController.php(95): CBaseController->renderInternal("C:\wamp\www\capa_monitoring\protected\views\complaint\admin.php", array("model1" => Complaint), true)

#12

C:\wamp\www\capa_monitoring\framework\web\CController.php(869): CBaseController->renderFile("C:\wamp\www\capa_monitoring\protected\views\complaint\admin.php", array("model1" => Complaint), true)

#13

C:\wamp\www\capa_monitoring\framework\web\CController.php(782): CController->renderPartial("admin", array("model1" => Complaint), true)

#14

C:\wamp\www\capa_monitoring\protected\controllers\ComplaintController.php(137): CController->render("admin", array("model1" => Complaint))

#15

C:\wamp\www\capa_monitoring\framework\web\actions\CInlineAction.php(49): ComplaintController->actionAdmin()

#16

C:\wamp\www\capa_monitoring\framework\web\CController.php(308): CInlineAction->runWithParams(array("Complaint" => array("report_number" => "", "item_code" => "", "item_name" => "", "created_date" => "", …), "yt2" => ""))

#17

C:\wamp\www\capa_monitoring\framework\web\filters\CFilterChain.php(133): CController->runAction(CInlineAction)

#18

C:\wamp\www\capa_monitoring\framework\web\filters\CFilter.php(40): CFilterChain->run()

#19

C:\wamp\www\capa_monitoring\framework\web\CController.php(1145): CFilter->filter(CFilterChain)

#20

C:\wamp\www\capa_monitoring\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)

#21

C:\wamp\www\capa_monitoring\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(CFilterChain)

#22

C:\wamp\www\capa_monitoring\framework\web\CController.php(291): CFilterChain->run()

#23

C:\wamp\www\capa_monitoring\framework\web\CController.php(265): CController->runActionWithFilters(CInlineAction, array("accessControl", "postOnly + delete"))

#24

C:\wamp\www\capa_monitoring\framework\web\CWebApplication.php(282): CController->run("admin")

#25

C:\wamp\www\capa_monitoring\framework\web\CWebApplication.php(141): CWebApplication->runController("complaint/admin")

#26

C:\wamp\www\capa_monitoring\framework\base\CApplication.php(185): CWebApplication->processRequest()

#27

C:\wamp\www\capa_monitoring\index.php(13): CApplication->run()

Number 5,9,14, and 27 are in red dots. I uploaded some files which may help.

Did you changed the column name in the database table complaint to: "creation_date"?

Yeah, it works.

When I changed the database to creation_date from created_date, it shows error says created_date is not defined then I change all creation_date in uploaded files to be created_date. Thank you.