This topic has 18 replies, 2 voices, and was last updated 9 years, 9 months ago ago by Eva Kemp
I noticed the custom registration page throws an “invalid email” error on ipad and iphone devices when registering, but not so from the PC. I went out to your site and tested it there on your mock registration page with the same results. Can you please advise on this matter?
Thanks so much!
Hello,
What theme version are you using? Our demo site has old version, but I’ve just tested registration on the site with the latest theme version and haven’t got any errors.
Thank you.
Regards,
Eva Kemp.
Hi Eva,
Wee are using version 2.5. Sorry for the late response.
Kevin
Hello,
Please update the theme to the latest version 2.6.1
Don’t forget to create a back up before update!
https://www.youtube.com/watch?v=KdWESIIPU1k
Thank you.
Regards,
Eva Kemp.
Updated to 2.6.1. No Change. When registering on an iPad or iPhone it errors out saying that the email address is invalid. This is happening on several other web sites that use Legenda as well. It does fine on a desktop.
Thanks,
Kevin
Hello,
As you’re using old Woocommerce plugin version you need update it as well because old plugins versions may create some conflicts to the latest theme version.
Also please make sure all the required plugins are up to date. You can download the latest plugins versions here:
https://www.8theme.com/download-plugins/
Thank you.
Regards,
Eva Kemp.
Nope. Already skinned that cat. We have another site using the latest tragic Woocommerce update and customers still cannot register using an iPad or iPhone. There is something that’s eval’ing the email address incorrectly, perhaps too strictly, for some reason and throwing the email address back as invalid.
I am wondering if this is a Legenda issue, or a Woo Commerce issue or a WordPress issue. It is happening on the custom registration screen. What is that screen calling to?
Thanks,
Kevin
Hi Eva,
We’ve tested the site using Android, Windows and Linux devices and all work well. The custom registration fails only on iOS devices. We checked out a few other sites using Legenda and found the same issue. Is there any way we can remove the email checking to see if it corrects the iOS issue?
We’ve also noticed compatibility issues with iThemes Security. In short, it can stop the registration page from appearing in some cases. Don’t know why.
Thanks,
Kevin
Last one for tonight.
I modified the theme functions file to return the email address with the error. I wanted to see if any special characters or additional spaces might be added to the string. None were. The email address was returned in pristine condition.
The actual string: PLEASE ENTER A VALID EMAIL.’CLIENT.CARE@********.COM’
So, the string is being passed accurately. I wonder what is tripping up the program at this point. It doesn’t make sense.
My program mods to return the above string….
/*Start
if(!preg_match(“/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/”, $email)) {
$return[‘status’] = ‘error’;
$return[‘msg’] = __( “Please enter a valid email.”.”‘”.$email.”‘”, ETHEME_DOMAIN );
echo json_encode($return);
die();
END */
Hello,
Please provide us with FTP and wp-admin panel credentials in Private Content.
Thank you.
Regards,
Eva Kemp.
Here you go.
Hello,
Sorry, but the credentials are incorrect.
Please check them.
Thank you.
Regards,
Eva Kemp.
Hi Eva,
See below…
Notes…
Okay, here’s what’s happening…
With iOS, when you add an email address to the registration for it must be added in LOWER CASE or the registration fails. Periods in the address do not cause a failure. I am going to mod the code to change it to lower case and see how all goes.
Kevin
The FIX:
The problem is iOS users can fail on registration because iOS expects a LOWER-CASE email address for some reason. Legenda preserves the input case so iOS fails it if there are any upper case characters present. We simply need to transform the email address to lower case and all is well for iOS.
This problem can be corrected easily. I am using Legenda 2.5. This will be similar in later versions from what I see until it is corrected by 8Theme. The theme-function.php file is in the /wp-content/themes/legenda/framework directory. It is where we need to play. In my file, it was line 1209 where I started. To change the email address to lower case, simply add the code I added below. (I know could have applied it to the original $email code line, but I like to keep my edits clean.)
Hope this helps for anyone who is experiencing this iOS issue. Hopefully 8Theme will incorporate it into their next update.
Kevin
~LINE 1201 //We shall SQL escape all inputs
$username = esc_sql($_REQUEST['username']);
if(empty($username)) {
$return['status'] = 'error';
$return['msg'] = __( "User name should not be empty.", ETHEME_DOMAIN );
echo json_encode($return);
die();
}
$email = esc_sql($_REQUEST['email']);
/************************** Change email to lower case for iOS BY KW ********************/
/************************** Add the next line here... ************************************/
$email = strtolower($email);
/************************** End lower case email mod by KW *******************************/
if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/", $email)) {
$return['status'] = 'error';
$return['msg'] = __( "Please enter a valid email.", ETHEME_DOMAIN );
echo json_encode($return);
die();
}
Ooops!
It’s the theme-functions.php file we’re talking about. (Forgot the ‘s’!)
Hello,
We’re glad you’ve found the solution.
That’s great.
If there are any questions feel free to contact us.
Regards,
Eva Kemp.
Tagged: error, invalid, mobile, registration, templates, woocommerce, wordpress
You must be logged in to reply to this topic.Log in/Sign up