By Marcus Roskill on Thursday, 17 January 2019
Posted in General
Replies 4
Likes 0
Views 535
Votes 0
Hi guys,

We have a common problem with people entering their name but putting a space after their first name. Meaning that there are two spaces between the first name and second name, so when you're trying to tag people if you don't know they have done this then you will not enter two spaces between the name to tag them. So it looks like the user doesn't exist? How can we stop spaces being entered into the first name and second name boxes and it really doesn't work well with tagging.

Thanks
Katie
Hey there,

I just checked and tested on your site.

I will take this user 'Clair Shaw' as an example since this user has a space after the name in the First Name field.

I tried to tag this user by one space after "@clair", it seems that I am able to find it. If I space for the second time, the tag will break as shown in the video.

Am I missing anything?
·
Thursday, 17 January 2019 19:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I mean a double space. So 'Clair Shaw' not 'Clair Shaw'
·
Thursday, 17 January 2019 19:23
·
0 Likes
·
0 Votes
·
0 Comments
·
We don't want people to be able to add double spaces as you cannot find them on search as no user expects to have to add a double space. The double space also like you said breaks the link.

How do we fix this?

Thanks
Katie
·
Thursday, 17 January 2019 19:25
·
0 Likes
·
0 Votes
·
0 Comments
·
I've help you applied some custom fix under this file JoomlaFolder/administrator/components/com_easysocial/models/friends.php


// if the search keyword contain a space then need to add 1 more space cater for those first name contain extra space
$term2 = str_replace(' ', ' ', $term);
$query[] = 'OR b.' . $db->nameQuote('name') . ' LIKE ' . $db->Quote('%' . $term2 . '%');


So the name suggestion search will handle this double space as well only specific on your site requirement, and this custom fix will not include into next release version.

Can you give it a check is it can able to search those first name contain a extra space?
·
Friday, 18 January 2019 17:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post