验证代码网址后,当我转到重置页面时,我在joomla 3.0中遇到了一个问题。/index.php/registration?view=reset&layout=complete。
场景是:在密码中填写不同的值并符合密码。然后提交表单,错误是:
通知 完成重置密码失败:异常"意外值异常",并显示消息"您输入的密码执行 不匹配。请在密码字段中输入所需的密码 ,然后在确认密码字段中输入您的输入。 在 /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), '', 'dfdefsdfdfdfdfdf', 对象(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): 用户模型重置->进程重置完成(数组) #3 /home/fiable/public_html/projects/canvasfast/libraries/legacy/controller/legacy.php(722): UsersControllerReset->complete() #4 /home/fiable/public_html/projects/canvasfast/components/com_users/users.php(15): JControllerLegacy->execute('complete') #5 /home/fiable/public_html/projects/canvasfast/libraries/legacy/component/helper.php(359): require_once('/home/fiable/pu...') #6 /home/fiable/public_html/projects/canvasfast/libraries/legacy/component/helper.php(339): JComponentHelper::executeComponent('/home/fiable/pu...') #7 /home/fiable/public_html/projects/canvasfast/include/application.php(205): JComponentHelper::renderComponent('com_users') #8 /home/fiable/public_html/projects/canvasfast/index.php(52): JSite->dispatch() #9 {main}
Joomla 3.0中测试,转到第130行组件\com_users\模型\重置.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;
}