Hello guys, i know this question has been asked at least a thousand times. I can’t however find my mistake, so i was wondering if you guys could help me.
I get this error, when posting a form:
CException
Property "SysReq.class" is not defined.
/Applications/XAMPP/xamppfiles/htdocs/YiiRoot1/framework/db/ar/CActiveRecord.php(159)
147 * PHP setter magic method.
148 * This method is overridden so that AR attributes can be accessed like properties.
149 * @param string $name property name
150 * @param mixed $value property value
151 */
152 public function __set($name,$value)
153 {
154 if($this->setAttribute($name,$value)===false)
155 {
156 if(isset($this->getMetaData()->relations[$name]))
157 $this->_related[$name]=$value;
158 else
159 parent::__set($name,$value);
160 }
161 }
162
163 /**
164 * Checks if a property value is null.
165 * This method overrides the parent implementation by checking
166 * if the named attribute is null or not.
167 * @param string $name the property name or the event name
168 * @return boolean whether the property value is null
169 */
170 public function __isset($name)
171 {
Stack Trace
#0
...
#4
– /Applications/XAMPP/xamppfiles/htdocs/Sitename/protected/views/game/_form.php(16): CActiveForm->errorSummary(Game, Genre, Platform, SysReq)
11 'enableAjaxValidation'=>false,
12 )); ?>
13
14 <p class="note">Fields with <span class="required">*</span> are required.</p>
15
16 <?php echo $form->errorSummary($model,$genre,$platform,$sysReq); ?>
17
18 <div class="row">
19 <?php echo $form->labelEx($model,'name'); ?>
20 <?php echo $form->textField($model,'name',array('size'=>45,'maxlength'=>45)); ?>
21 <?php echo $form->error($model,'name'); ?>
#5
...
#8
– /Applications/XAMPP/xamppfiles/htdocs/sitename/protected/views/game/create.php(18): CController->renderPartial("_form", array("model" => Game, "genre" => Genre, "platform" => Platform, "sysReq" => SysReq))
13 );
14 ?>
15
16 <h1>Create Game</h1>
17
18 <?php echo $this->renderPartial('_form', array('model'=>$model, 'genre'=>$genre, 'platform'=>$platform, 'sysReq'=>$sysReq)); ?>
#9
...
#13
– /Applications/XAMPP/xamppfiles/htdocs/sitename/protected/controllers/GameController.php(89): CController->render("create", array("model" => Game, "genre" => Genre, "platform" => Platform, "sysReq" => SysReq))
84 $this->render('create',array(
85 'model'=>$model,
86 'genre'=>$genre,
87 'platform'=>$platform,
88 'sysReq'=>$sysReq,
89 ));
90 }
91
92 /**
93 * Updates a particular model.
94 * If update is successful, the browser will be redirected to the 'view' page.
Can you guys give me a hint on what’s wrong?