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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search Error - After creating Smart Group
Pages: [1]

Author Topic: Search Error - After creating Smart Group  (Read 3930 times)

ryanpitt

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Search Error - After creating Smart Group
August 29, 2007, 06:23:11 am
Hi All,
I am fairly new to CiviCRM and am having a great time setting up 14k+ record contact database for a client of mine.
Currently I am using CiviCRM 1.8 on PHP5, linux/apache web server.

I had a request for contacts from two states (Kansas and Missouri) so I ran an Advanced Search for each state and created a smart group from the search results of each.   Now when I go to do a search, advanced search or search builder query, and select either or both of the two smart groups I get this error.(Twice if both groups are selected)

warning: Invalid argument supplied for foreach() in /var/www/core-id/drupal/modules/civicrm/CRM/Core/BAO/Mapping.php on line 683.

The search then returns *every* record in the database.

My first thought is the fact that I had created a custom field for the contacts and maybe something isnt matching up correctly.

Any help would be greatly appreciated.
Thanks and Kind Regards
Ryan

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Error - After creating Smart Group
August 29, 2007, 12:14:34 pm

Ryan:

Can you please try to reproduce this case on our demo server, and if so, can you please file an issue

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Error - After creating Smart Group
August 29, 2007, 12:27:27 pm
Hi - I have had the same errors (see quote from internal email) and suspect that it was basically caused by the Smart Group not creating correctly - and if I deleted the Smart Groups, reworked the search, recreated the Smart Groups (and if everything went properly) then everything worked sweet. So no technichal response from me but 'you are not on your own'.

Quote
However also note that twice when i created a Smart Group i got

    * warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php on line 683.
    * warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php on line 683.
 
and once


    * warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php on line 742.
    * warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php on line 683.

when i think on both occasion i did the right thing.

and when i tried the search builder  i got
warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php on line 683. - oh! same thing
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Error - After creating Smart Group
August 29, 2007, 01:10:28 pm

Peter:

Would be great if you can reproduce this on demo, so we can fix it before the next 1.8 revision release. I suspect its a fairly trivial bug and easy to fix once we can reproduce

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: Search Error - After creating Smart Group
August 29, 2007, 01:16:54 pm
I was able to replicate warning message issue while creating smart group. So filed http://issues.civicrm.org/jira/browse/CRM-2242

kurund
Found this reply helpful? Support CiviCRM

ryanpitt

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: Search Error - After creating Smart Group
August 29, 2007, 01:20:17 pm
Thanks Kurund!
Saved me the effort - much appreciated.
I look forward to seeing this resolved.
Thank you everyone.
Regards
Ryan

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Error - After creating Smart Group
August 29, 2007, 03:41:30 pm
On a related note - there have been a couple of times when I have made a change to a Smart Group - and the change has not 'stuck' - but then i realised that i wasn't getting the window that asks one to confirm the change of Update Smart Group - so had to go through and do it all again. Our server is down so can't be more specific than that at present.

But I would also note that on a couple of occassions I have forgotten to click 'GO" and I also note the instructions say
"select Update Smart Group from the '- more actions -' drop-down menu" but then do not say AND THEN CLICK GO!
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Error - After creating Smart Group
August 29, 2007, 03:59:34 pm

Peter:

Can you please edit the documentation to say the needful. ALL the 'actions' require you to click 'GO!', so you might want to add a generic comment for all actions

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Error - After creating Smart Group
August 29, 2007, 04:12:37 pm
Hey Lobo - not sure if I am hearing you clearly. Are you asking me for a suggested rewording?? If so
"If you've changed search criteria for this 'smart group' and want to save your changes, select Update Smart Group from the '- more actions -' drop-down menu, and then click GO".
At a more generic level, the 'Search' page could be improved from
Quote
Use the Search Criteria form to find contacts by name, type of contact, group membership, tags, etc. You can then view or edit contact details, print a contact list, assign tags, export contact data to a spreadsheet, etc.
to
Quote
Use the Search Criteria form to find contacts by name, type of contact, group membership, tags, etc. You can then view or edit contact details, or you can use the More Actions drop down list to print a contact list, assign tags, add to Groups, create Smart Groups, export contact data to a spreadsheet, etc.
If not, can you ask me again - sorry.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Error - After creating Smart Group
August 29, 2007, 06:28:35 pm

Peter:

Can you give me the url's on the demo server where the below text occurs and i'll fix it in svn. I cant seem to find where it occurs! (sorry). If this is on the documentation wiki can you please edit the page and make the needed changes

apologies for being a bit dense here :(

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Error - After creating Smart Group
August 29, 2007, 07:08:23 pm
Lobo - could just be me using wrong terminology.
http://demo.civicrm.org/drupal/civicrm/contact/search/basic?_qf_Search_display=true&qfKey=352161998d7a89d7c0053853f1ef92e6 for the search and
http://demo.civicrm.org/drupal/civicrm/contact/search/advanced?reset=1&force=1&ssID=7 for updating smart groups.
Wasn't with you on the documentation thing when you said
Quote
edit the documentation
.
So now I have found the section in the Documentation Wiki http://wiki.civicrm.org/confluence/display/CRMDOC/Smart+Groups and have made some additions but felt that Edit Smart Group Criteria needed more prominence but it obviously isn't an H4 tag so not sure what formatting should be applied.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Error - After creating Smart Group
August 29, 2007, 08:47:44 pm

Fixed the help text in svn. will be part of the next 1.8 release

Not sure what issue you had with formatting on the wiki. The wiki help is quite nice and useful

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Error - After creating Smart Group
August 29, 2007, 09:17:18 pm
No probs - sorted on wiki by putting in an 'info' box  :)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Search Error - After creating Smart Group
August 29, 2007, 09:39:42 pm
I have fixed http://issues.civicrm.org/jira/browse/CRM-2242, was bit tricky to get this behavior :)

This will be part of next 1.8 revision release.

thanx

kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search Error - After creating Smart Group

This forum was archived on 2017-11-26.