• Resolved wpusrnm

    (@wpusrnm)


    I have various users (3 at the moment) reporting when they’re trying to post an advert Chrome doesn’t recognize the email returnuning “wrong email” or something like this translated from spanish. I’ve tried to reproduce the error on two andorid devices I have and it seems everything is fine. I’ve asked what Android ver. they’re using, but have no answers yet. The only thinf i know for sure it’s Chrome on Android.

    • This topic was modified 6 years, 2 months ago by wpusrnm.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    The email validation is being done by the server so it should work exactly the same on Chrome, FireFox and other browsers on all the mobile and desktop devices.

    It would be best if you could ask the customer what email address he entered in form and send the email address to me via the contact form here https://wpadverts.com/contact/ (so the email will not be shared publicly) i will take a look at it on my dev site.

    Thread Starter wpusrnm

    (@wpusrnm)

    Hi, I don’t believe the problem is on the server. I’ve tried to post an advert with the same email one of them gave me and had no problems to post it. That’s why I think the problem should be in the browser. But when I asked about the OS and browser versions they were like “hmm who’s this guy making too much questions about my software”, so they did tell nothing about versions.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, maybe the user is entering the same user but has some whitespace characters added at the end of the email, so while it looks the same, it is not a valid address, you should be able to remove the invalid characters from the end of email address by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "customize_adverts_add_10638879" );
    function customize_adverts_add_10638879( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == "adverts_email" ) {
          adverts_form_add_filter("my_trim", array(
            "description" => "Trim whitespaces",
            "callback" => "my_trim_filter"
          ));
          $form["field"][$key]["filter"] = array( array( "name" => "my_trim" ) );
        }
      }
      return $form;
    }
    function my_trim_filter( $data ) {
        return trim( $data );
    }
    
    Thread Starter wpusrnm

    (@wpusrnm)

    ok, thanks, I’ll give it a try and will try to contact them to see if the problem persists. thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug report: Chrome on Android returns “wrong email”’ is closed to new replies.