Guest theartifactcompany Posted January 24, 2013 Share Posted January 24, 2013 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 Quote Link to comment Share on other sites More sharing options...
goober999 Posted January 25, 2013 Share Posted January 25, 2013 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 Quote Link to comment Share on other sites More sharing options...
globimagen Posted January 25, 2013 Share Posted January 25, 2013 i made that and its not working Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 25, 2013 Share Posted January 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
globimagen Posted January 25, 2013 Share Posted January 25, 2013 thank you so much Quote Link to comment Share on other sites More sharing options...
convict Posted January 25, 2013 Share Posted January 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.