CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • customizing profile search
Pages: [1]

Author Topic: customizing profile search  (Read 1163 times)

zack

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal
  • MySQL version: n/a
  • PHP version: n/a
customizing profile search
January 26, 2012, 01:31:18 pm
Hello,

I am having an issue with a Profile Search. It appears that it always requires a country to be chosen in order to work.

For example, I can search for the name "admin" and it will only show up when I have United States selected. If I leave the country field as " - select - ", then no results show up at all. I would like it so that if I leave country as " - select - " it does a world-wide search.

Does anyone know of the solution or have any idea?

Here are some screen shots that help clarify what I'm talking about.
imgur.com/a/qi38M
« Last Edit: January 26, 2012, 01:35:31 pm by zack »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: customizing profile search
January 26, 2012, 10:15:56 pm
Seems to be working fine on sandbox, check http://sandbox.drupal.civicrm.org/civicrm/profile?gid=10&reset=1

Kurund
Found this reply helpful? Support CiviCRM

zack

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal
  • MySQL version: n/a
  • PHP version: n/a
Re: customizing profile search
January 27, 2012, 07:46:11 am
Thank you, I think I found a bug here as a result.

Go to the link that you provided. Under country, select United States. Then, change it back to - select -

You will see that the box below says, " - select a country - " and the issue I described then occurs. 0 results.

...This replicates my problem because my Profile Search defaults to the United States, so if someone changes it to - select -, they get the issue.

I can't seem to find a way to change the default to - select - instead of the United States. I even changed the localization setting, but that did not fix it. I am fine with this temporary workaround while civi fixes the bug.

Any ideas?
« Last Edit: January 27, 2012, 07:48:03 am by zack »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: customizing profile search
January 27, 2012, 09:40:55 am
Can you try below patch:

Quote
Index: packages/jquery/plugins/jquery.chainedSelects.js
===================================================================
--- packages/jquery/plugins/jquery.chainedSelects.js   (revision 38551)
+++ packages/jquery/plugins/jquery.chainedSelects.js   (working copy)
@@ -56,7 +56,7 @@
             $(target).get(0).add(new Option(data.name, data.value), document.all ? i : null);
              }
          } else {
-            $(target).get(0).add(new Option('- select a country -', 0), document.all ? i : null);
+            $(target).get(0).add(new Option('- select a country -', ''), document.all ? i : null);
          }
 


Kurund
Found this reply helpful? Support CiviCRM

zack

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal
  • MySQL version: n/a
  • PHP version: n/a
Re: customizing profile search
January 27, 2012, 09:52:54 am
Had no effect

Edit: That fixed the 0 results showing up actually. Thanks!

But it did not change United States to "- select -" for default. Is there still no way to do that?
« Last Edit: January 27, 2012, 09:58:37 am by zack »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: customizing profile search
January 27, 2012, 10:34:23 am
Quote
But it did not change United States to "- select -" for default. Is there still no way to do that?

When I change "- select -" for country then only I get "- select a country -"., I think current behavior is fine.

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • customizing profile search

This forum was archived on 2017-11-26.