1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Validation-message of Facebook username

Discussion in 'Resolved Bug Reports' started by Grover, Apr 26, 2014.

  1. Grover

    Grover Well-Known Member

    Something little (nothing serious whatsoever) I noticed:

    - When I fill in my Facebook username in my Contact Details , like this (copy and pasting it from the Facebook URL):

    'https://www.facebook.com/grover.sesamestreet' and click [Save Changes] then XF trimmes it to 'grover.sesamestreet'.

    However, when I fill it in like this (without the https://)

    'www.facebook.com/grover.sesamestreet' and click [Save Changes] then XF does not trim it, but instead gives me this error message:

    I guess it's a little inconsistent, since both URL's are valid URL's to my profile. I would expect that both instances would be trimmed (which in itself is already nice help for the enduser as it is) without displaying an error.
  2. Chris D

    Chris D XenForo Developer Staff Member

    Most people will instinctively post their full URL, as you have done.

    So if you post http://www.facebook.com/grover.sesamestreet or https://www.facebook.com/grover.sesamestreet, XenForo can detect that as a URL and trim it down to the bit it wants you to store, which is your Facebook profile username grover.sesamestreet (or user ID, the numeric version of your username).

    If you remove the https:// or http:// then XenForo will struggle to detect this as a URL, therefore it thinks you may be trying to pass that off as your actual profile name, but XenForo knows that Facebook doesn't allow / in its username hence it is invalid.

    So it appears to be working as expected.
  3. Mike

    Mike XenForo Developer Staff Member

    I was going to leave this, but we actually do a rather specific pattern match already, so I think I can just relax that a bit and it won't hit any false positives.
  4. Grover

    Grover Well-Known Member


    Yes, for you and people who see/think/understand more from a technical point of view. But for your average novice end-user they will not get why 'https://www.facebook.com/grover.sesamestreet' does not give them an error message and 'www.facebook.com/grover.sesamestreet' does. For them both URLS seem to be correctly point to their profile. Certainly, you are right by stating that most people will put in the former one, so all in all it's more or less a non-issue (which I already stated in my first posting). But it's nice that it gets looked at regardless: that's one of the many reasons why I love this product.

    Product suggestion, @Mike: talking about end-user guidance: is there a reason why the Facebook accountname is not clickable after submitting it? When you go to the 'Interact' section on a member's profile, one just sees the Facebook account name, but it can not be clicked. Being able to click it... stating the obvious now... makes it easier for the enduser to go directly to the Facebook profile of a XF user.

Share This Page