Hi! I'm back!

BP Profile Search › Hi! I'm back!

  • Author
    Post
  • #9466 Reply
    Christina
    Guest

    Hi,
    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!
    Christina

    #9467 Reply
    Christina
    Guest

    Just 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!

    #9469 Reply
    andrea
    Plugin Author

    Hello 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?

    #9471 Reply
    Christina
    Guest

    Hi 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!
    Christina

    #9472 Reply
    Christina
    Guest

    AND I found the answer, thanks again for the help in the direction to look!
    Have a great weekend!

    #9473 Reply
    andrea
    Plugin Author

    That’s great!

    How did you solve the issue? Your solution could help other readers.

    #9478 Reply
    Christina
    Guest

    Hi!

    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!

    #9479 Reply
    andrea
    Plugin Author

    Thank you for your solution, I hope it will help other readers having the same question.

Reply to: Hi! I'm back!
My Information