2

for some reason, in recent weeks my customers are getting "password does not match" errors when making accounts etc.

I know there is a known issue on 1.9.1.0, but I am using 1.9.0.1

Does anyone have a fix or workaround that applies to 1.9.0.1?

14
  • Do you have a test customer with a password you know? Try creating a new customer and compare hashes. Might be a salt issue. Also, does resetting the password solve it? Commented Sep 7, 2015 at 17:39
  • the problem i've replicated so far is making a new account, and needing to enter the new password 2 times - thus getting the error. Not sure how I can check that hashes at that stage - the data isn't in the database.
    – egg
    Commented Sep 7, 2015 at 17:41
  • so the user you create has an account without password in the database? Please check the error logs for possible leads and think of any modules that might cause an error Commented Sep 7, 2015 at 17:42
  • sorry, to clarify - creating a new user account, via the "register" link, you then get the error. In the initial, create an account screen.. (so nothing in the DB at that stage - all new)
    – egg
    Commented Sep 7, 2015 at 17:44
  • 1
    Make sure in login form there should be : <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
    – Arunendra
    Commented Sep 14, 2015 at 8:23

3 Answers 3

3
+50

Enable template path hints and look in template for this line:

<?php echo $this->getBlockHtml('formkey'); ?>

If this is missing, add it in your template file.

6
  • thanks, but can you clarify in which file and where that should be?
    – egg
    Commented Sep 16, 2015 at 13:29
  • Enable template path hints and look your file path
    – Arunendra
    Commented Sep 16, 2015 at 13:46
  • Hi, so far, this is the closest to my solution. I followed the guide here: magento.stackexchange.com/questions/31933/…, and entered the following code into my register.phtml page <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" /> . This is basically what you are suggesting, right? I entered it mutliple times in that file, each time I found a <ul class="form-list"> ... not sure if thats overkill or correct - but for the moment, I can create a new account!! Success!!
    – egg
    Commented Sep 16, 2015 at 14:02
  • I just wonder... is it really OK to edit the file in app\design\frontend\base\default\template\customer\form\register.phtml or should be making my own version of that?
    – egg
    Commented Sep 16, 2015 at 14:05
  • 1
    @egg, you should only have to add that line once, right after the opening form tag. You should copy that file to your theme and make the changes there so that they are not overwritten by the next upgrade. Commented Sep 17, 2015 at 12:55
2

Search for setConfirmation() and getConfirmation() in your extensions and replace with setPasswordConfirmation() and getPasswordConfirmation().

Or if they should stay compatible with older versions, use something like this:

$info = Mage::getVersionInfo();
$version = "{$info['major']}.{$info['minor']}.{$info['revision']}.{$info['patch']}";

if($version >= '1.9.1.0'){
$customer->setPasswordConfirmation($this->getRequest()->getPost('confirmation')); // just check the name of confirm password field in the registration form accordlingly add the name in the get Post
} else {
$customer->setConfirmation($this->getRequest()->getPost('confirmation')); // just check the name of confirm password field in the registration form accordlingly add the name in the get Post
}
8
  • for more info refer pradeepsanku.com/2015/05/15/… Commented Sep 14, 2015 at 9:56
  • I added some explanation to your code snippet, hope it matches your intent. Commented Sep 15, 2015 at 9:20
  • thanks... but which file should this be inserted into?
    – egg
    Commented Sep 16, 2015 at 13:07
  • see this link for more details pradeepsanku.com/2015/05/15/… Commented Sep 16, 2015 at 13:20
  • Hi, in my Mage_Customer_Model_Customer.php I see the public function validate(), and within this: $confirmation = $this->getConfirmation(); if ($password != $confirmation) { $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.'); }. Am i meant to overright this? Some clarity on where to enter your code would be great, thanks!!
    – egg
    Commented Sep 16, 2015 at 13:27
0

Have you used any extension for checkout???

I had same error in firechecout extension then I change the following code, set $customer->setPasswordConfirmation instead of $customer->setConfirmation in Model/Standered.php

4
  • i'm using GOMAGE LightCheckout... I will see if I can find that file/code.. thanks
    – egg
    Commented Sep 14, 2015 at 9:49
  • hii egg have you find the solution or not?? Commented Sep 14, 2015 at 11:04
  • sorry... been in meetings all day - will try to troubleshoot in the morning and get back to you all! Thanks.
    – egg
    Commented Sep 14, 2015 at 20:50
  • I'm sorry... i'm unable to find any standard.php file which has this text in. Not sure if I look in the wrong place... but currently stuck. Any more tips?
    – egg
    Commented Sep 16, 2015 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.