On one of my IBM Connections Site i had a problem with directory search (better the typeahead search). When we searched single characters no business cards are displayed.
I use Firebug for Chrome here and you see, that the search gets an result back from Connections, but no business cards are displayed.
When i open this get statement i get a list of profile documents in JSON format:
In this case i a got a list of about 20 User profiles. When i search a little bit more detailed i get an error of a Javascript, which should interpret the JSON list. Thanks to the developer (I think it is a dojo script)! “There was an error!” is a great response for troubleshooting and searching the error on Google or Bing!
The list has following format:
{
"identifier":"member",
"label":"name",
"items":[
{
"name":"John Doe",
"userid":"70026A2C-BE77-8491-C125-XXXXXX",
"uid":"john.doe@stoeps.tld",
"member":"john.doe@stoeps.tld",
"type":"0",
"ext":{
"first":"",
"groupwareEmail":"john.doe@stoeps.tld",
"guid":"70026A2C-BE77-8491-C125-XXXXX",
"mobileNumber":"+49 (123) 12 34 567",
"floor":"2nd",
"email":"john.doe@stoeps.tld",
"countryCode":"DE",
"givenName":"John",
"jobResp":"Assistant",
"faxNumber":"+49 (123) 456789",
"bldgId":"Member of "Android Lovers"",
"uid":"john.doe@stoeps.tld",
"sourceUrl":"ldap://ldapserver:389/(undefined=_search_base_)?(&(ObjectClass=*)(Attribute=1))",
"surname":"Doe",
"key":"00009asdkfjakf",
"displayName":"John Doe",
"telephoneNumber":"+49 (1234) 56789",
"distinguishedName":"CN=John Doe,OU=Admin,OU=DE,O=STOEPS",
"workLocationCode":"Munich",
"timezone":"Etc/GMT+12",
"lastUpdate":"2012-03-05 14:23:34.504"
}
}
]
}
Problem here is the field bldgId: "Member of "Android Lovers""
.
You can see double ” which are not masked. Our IBM Connections User can fill nearly everything in the fields in Profiles, but get no warning if he uses quotes and quotes are not masked, when they are stored in the database.
So when you have on user who uses quotes in one of his Profile fields, the typeahead search displays no results for character searches which contains this user (and no error message).
Finding such fields with regular expressions
I tested the typeahead search on all characters and copied the result of the GET statement out of Firebug and developed a regexp to find double quoted strings:
:\"\"[a-zA-Z0-9\.\/\+\-\:\s äöüÄÖÜ]\"
On Mac OS X you can use RegExRX or Notepad++ on Windows to test this regexp and you will get the wrong field values.
TDI and Typeahead
You can see in the result list, that TDI Search Urls are saved in each
profile document too!
"sourceUrl":"ldap://ldapserver:389/(undefined=search_base)?(&(ObjectClass=*)(Attribute=1))"
,
so please be careful, when you configure your search strings, because a
double quoted attribute breaks typeahead search too!