2

当我在验证代码 url 为 ../index.php/registration?view=reset&layout=complete 后进入重置页面时,我在 joomla 3.0 中遇到问题。

场景是:在密码中填写不同的值,并符合密码。然后提交表单,报错:

注意 完成重置密码失败:异常“UnexpectedValueException”并显示消息“您输入的密码不匹配。请在密码字段中输入您想要的密码,并在确认密码字段中输入以确认您的输入。在 /home/fiable/public_html/projects/canvasfast/libraries/joomla/form/form.php:1872 堆栈跟踪:#0 /home/fiable/public_html/projects/canvasfast/libraries/joomla/form/form.php(1105 ): JForm->validateField(Object(SimpleXMLElement), '', 'dfdefsdfdfdfdf', Object(JRegistry)) #1 /home/fiable/public_html/projects/canvasfast/components/com_users/models/reset.php(122): JForm->validate(Array) #2 /home/fiable/public_html/projects/canvasfast/components/com_users/controllers/reset.php(156): UsersModelReset->

4

1 回答 1

1

在 joomla 3.0 中测试转到第 130 行 components\com_users\models\reset.php

替换波纹管代码:

 // Check the validation results.
        if ($return === false) {
            // Get the validation messages from the form.
            foreach ($form->getErrors() as $message) {
                $this->setError($message);
            }
            return false;
        }

到:

     // Check the validation results.
      if ($return === false) {
   $errors = $form->getErrors();
   for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {
    if ($errors[$i] instanceof Exception) {
     $this->setError($errors[$i]->getMessage());
    } else {
     $this->setError($errors[$i]);
    }
   }

   return false;
  }
于 2013-01-28T12:52:13.477 回答