Support » Plugin: BP Profile Search » Age Range Search Not Working

  • In the Installation section for this plugin it says that “currently the date box fields are not supported”. I am using Gravity Forms Registration add on to create a custom registration page that uses the three drop down date selector to enter a birthdate. The date displays in the new user profile but the age search does not work for new users. Not until a new user goes back to their activated profile and resaves their birthdate does the age search work.
    Any guidance on configuring the settings to make this work would be appreciated. Do I need to generate an Age field using Buddypress Costom Field Types or another plugin to make the age search work?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I noticed that on the “Profile Search Setup” page I am unable to check the “Birthday” field in the “Selected Profile Fields” list. Perhaps this is why this field is not working?

    Plugin Author Andrea Tarantini


    I don’t know how Gravity Forms Registration works, so I can only guess it stores the date in the timestamp format.

    BuddyPress can read both the timestamp and the text format, but it saves the date in the text format.

    BP Profile Search supports the text format only, and this could explain the issue you are experiencing but, as I said, that’s just my guess.

    Please let me know if you have more information.

    Thank you for your reply. I think you are correct. Gravity forms is saving in the timestamp format which looks like this: 480297600. As you say, Buddypress reads both formats so it is able to display the birthdate correctly in the member profile as March 22 1985. However BP Profile Search must not be able to read this format. The entries in the database that BP Profile Search is able to process look like: 2012-02-23 06:12:45 which I believe is the MySQL date format or as you call it the text format.
    Unfortunately Gravity Forms does not support compatibility with other plugins, and because their format works with Buddypress their support cannot help.
    So to fix this I either need to convert the Gravity Forms database entry to the MySQL date format or figure out if their is a hook in BP Profile Search to convert the timestamp to MySQL date format.
    Any thoughts?

    Plugin Author Andrea Tarantini


    I would prefer your first solution, that is store the date in the proper format in Gravity Forms.

    Your second solution, modify BP Profile Search, would always require two database queries, one to search dates in the timestamp format and the second to search dates in the MySQL format, with an obvious performance penalty.

    If you are interested in this second solution anyway, I suggest you have a look at BP Profile Search version 2.7, where the timestamp format was supported (BuddyPress changed the date format in BP 1.5, and BP Profile Search changed accordingly in version 2.8).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Age Range Search Not Working’ is closed to new replies.