Jump to content

New Customer Registration Issues with 5.2.0


Guest theartifactcompany

Recommended Posts

Guest theartifactcompany

Anyone else seeing this? I thought it was a result of the upgrade from 5.1.5 to 5.2.0

 

What happens is the user fills out the form (even with recaptcha disabled) hits register, then it loops back to the register form only now the password fields are blank and the acceptance of terms and conditions are unchecked.

 

I tried a vanilla plain installation of 5.2.0 here http://www.theartifactcompany.com/cc5_2/ other than uploading a logo and setting store info, nothing has changed.

 

Customer registration was working without recaptcha on 5.1.5 for my store here: http://www.theartifactcompany.com/cc5/

 

I don't see anyone else mentioning this issue.

 

My server is running PHP Version 5.2.17

Link to comment
Share on other sites

 it's a CubeCart v5.2.0 bug and I am sure a fix is coming soon. It's not something they can delay.
For those who already upgraded and want a "fix" now. Here it is.

Edit file: /classes/cubecart.class.php

on line 2414 you'll find:
if (isset($_POST['register']) && $_POST['register']==1) {
change it to:
if (isset($_POST['register']) && $_POST['register']=="Register") {

Thanks
/Goober
 
Link to comment
Share on other sites

Would you please check the admin screen System Error Logs to note any reports of something that PHP or CubeCart didn't like.

 

Actually, the form element is:

<input type="submit" name="register" value="{$LANG.account.register}" class="button_submit" />

 

So the value returned to the form processor is the word that would translate to English as "Register".

 

Here's how I see it (if this is the actual fix):

To have the form processor accurately test for this value as being legitimate, change that line from:

if (isset($_POST['register']) && $_POST['register']==1) {

to:

if (isset($_POST['register']) && !empty($_POST['register'])) {

as any 'true-type' response will do. We must compare the value as a string against what is considered not empty.

 

 

To be really picky, make the line look like:

if (isset($_POST['register']) && $_POST['register'] == $GLOBALS['language']->account['register']) {

 

 

(The reason why the number 1 doesn't work is that, to compare a string to a number, PHP converts the string to its numerical equivalent, which is the number 0.)

 

BTW, CC515 has just if (isset($_POST['register'])) { and I have no idea why it was changed. Who cares what the value is.

Link to comment
Share on other sites

Official fix, change

if (isset($_POST['register']) && $_POST['register']==1) {

to

if (isset($_POST['register']) && !empty($_POST['register'])) {

 

it just covers both of registration area.  Value 1 check

$_POST['register']==1

has been added becasue of popular 3rd party skin to support even radio button on checkout area however standard registration page omitted.

 

Thanks folks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...