BP Profile Search › Hi! I'm back!
-
AuthorPost
-
Christina
GuestHi,
I am back with an issue and I am hoping you can help me.We often update our user profiles with data from Salesforce. When the data goes in, it’s from a CSV, it updates all the users and when we have the xprofile field type set as a check box, it’s great. It’s in there. I can see it in each user profile.
But when I try to search via the checkbox type, nothing returns.
To test, I did a text search by any field, and the results are there.
Then, I went and saved a profile and the data returns on the checkbox search.Have you seen this before? How did you handle it?
Thanks in advance!
ChristinaChristina
GuestJust letting you know the members page has been set up so you can see what I mean about getting results in a text search and not in the checkbox/multiselect search.
Thanks again, in advance!andrea
Plugin AuthorHello Christina,
That happens when the checkbox values are imported in a format that’s not the standard serialized format.
BuddyPress is able to display that format, and the simple text search works, but BP Profile Search can’t find search results until the next profile save operation, which restores the standard serialized format.
By the way, how are you importing the profile values?
Christina
GuestHi Andrea,
Thanks for the response. The data is a CSV from Salesforce. I don’t *think* I have another option for export/import, but it will be something I will check into…Additionally, it is updated frequently/monthly FROM Salesforce exports.
That said, is there a way around it? A way to serialize data in the CSV? Or once it’s in the mySQL database?
Thanks for your help and knowledge!
ChristinaChristina
GuestAND I found the answer, thanks again for the help in the direction to look!
Have a great weekend!andrea
Plugin AuthorThat’s great!
How did you solve the issue? Your solution could help other readers.
Christina
GuestHi!
We used search & replace to serialize the data. So
‘SanFran/Oakland’ became ‘a:1:{i:0;s:15:”SanFran/Oakland”;}’
The s:15 is the character count.
It was a daunting prospect that ended up being very easy.Thanks!
andrea
Plugin AuthorThank you for your solution, I hope it will help other readers having the same question.
-
AuthorPost