CException

CCaptchaValidator.action "captcha" is invalid. Unable to find such an action in the current controller.

/home/daomenkou/framework/validators/CCaptchaValidator.php(77)

65     {
66         if(($captcha=Yii::app()->getController()->createAction($this->captchaAction))===null)
67         {
68             if(strpos($this->captchaAction,'/')!==false) // contains controller or module
69             {
70                 if(($ca=Yii::app()->createController($this->captchaAction))!==null)
71                 {
72                     list($controller,$actionID)=$ca;
73                     $captcha=$controller->createAction($actionID);
74                 }
75             }
76             if($captcha===null)
77                 throw new CException(Yii::t('yii','CCaptchaValidator.action "{id}" is invalid. Unable to find such an action in the current controller.',
78                         array('{id}'=>$this->captchaAction)));
79         }
80         return $captcha;
81     }
82 
83     /**
84      * Returns the JavaScript needed for performing client-side validation.
85      * @param CModel $object the data object being validated
86      * @param string $attribute the name of the attribute to be validated.
87      * @return string the client-side validation script.
88      * @see CActiveForm::enableClientValidation
89      * @since 1.1.7

Stack Trace

#2
+
 /home/daomenkou/protected/views/site/contact.php(73): CActiveForm->error(ContactForm, "verifyCode")
68         <?php $this->widget('CCaptcha'); ?>
69         <?php echo $form->textField($model,'verifyCode'); ?>
70         </div>
71         <div class="hint">Please enter the letters as they are shown in the image above.
72         <br/>Letters are not case-sensitive.</div>
73         <?php echo $form->error($model,'verifyCode'); ?>
74     </div>
75     <?php endif; ?>
76 
77     <div class="row buttons">
78         <?php echo CHtml::submitButton('Submit'); ?>
#7
+
 /home/daomenkou/protected/controllers/SiteController.php(649): CController->render("contact", array("model" => ContactForm))
644                 mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);
645                 Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
646                 $this->refresh();
647             }
648         }
649         $this->render('contact',array('model'=>$model));
650     }
651 
652     /**
653      * Displays the login page
654      */
#22
+
 /home/daomenkou/index.php(57): CApplication->run()
52 header('Access-Control-Allow-Methods:*');
53 // 响应头设置
54 header('Access-Control-Allow-Headers:content-type,token,id,userId');
55 header("Access-Control-Request-Headers: Origin, X-Requested-With, content-Type, Accept, Authorization");
56 
57 Yii::createWebApplication($config)->run();
2024-03-28 21:30:28 Apache Yii Framework/1.1.15