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) »
  • Editing smart group criteria throws error
Pages: [1]

Author Topic: Editing smart group criteria throws error  (Read 2695 times)

dotman

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Editing smart group criteria throws error
November 01, 2011, 08:29:33 am
I have CiviCRM 4.0.6 setup using MAMP with a multisite setup using D7.8 (separate databases). I've created a smart group. When i chose to edit criteria, I get this error at the top of the page, and am unable to open the tab to alter my setting. any ideas on what migh be casing this?:

Code: [Select]
Notice: Undefined offset: 2 in CRM_Core_BAO_Mapping::buildMappingForm() (line 661 of /Users/dougrose/Sites/civi/sites/all/modules/civicrm/CRM/Core/BAO/Mapping.php).

Thanks,
Doug

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Editing smart group criteria throws error
November 01, 2011, 11:07:14 am
I'm also getting a similar problem - not the error code - but when I pull up a smart group and want to change the criteria, the Edit Search Criteria option will not uncollapse so I cannot edit it.  Any thoughts?

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: Editing smart group criteria throws error
November 01, 2011, 01:16:07 pm
things not expanding is usually theme/javascript related - and if it works on Demo but not yours then try another theme or you may need to see what isn't loading on the page (via Inspect Element)
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

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Editing smart group criteria throws error
November 01, 2011, 02:11:53 pm
Thanks Pete, we'll look into that.  We also have an issue that the summary overlay box doesn't show when you place the mouse over the people icon.  It was fine until recently but now, when you place the mouse over the icon, it doesn't appear in a box.  If you click, the summary info comes up in a separate window.  Might this also be theme/Javascript related or is it a different sort of issue?

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Editing smart group criteria throws error
November 11, 2011, 01:35:18 am
I am having the same problem as LindseyM with the Edit Search Criteria option not uncollapsing for Smart Groups. If I turn on the JavaConsole, I get the following error showing:
Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function

Any thoughts?   :-\

jcasharpe

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 5
    • Woodlands Church
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: MariaDB 10.0.13
  • PHP version: 5.5
Re: Editing smart group criteria throws error
November 18, 2011, 08:14:01 am
The problem is a bug in the jquery.contextMenu.js file -> the file should start:
if(jQuery)( function($) {

instead of the current:

if(jQuery)( function() {

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Editing smart group criteria throws error
November 21, 2011, 02:02:12 am
Brilliant, this sorts it out. ;D Thanks jcasharpe. Anyone know whether this will be corrected in a future release?

Here is the path for anyone who wants to modify it:
/sites/all/modules/civicrm/packages/jquery/plugins/jquery.contextMenu.js

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: Editing smart group criteria throws error
November 21, 2011, 04:16:57 am
Quote
Anyone know whether this will be corrected in a future release?

This is already fixed.

Kurund
Found this reply helpful? Support CiviCRM

jstn

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.0.0
  • CMS version: Drupal 7 Stable
  • MySQL version: Recent Stable?
  • PHP version: PHP 5
Re: Editing smart group criteria throws error
December 22, 2011, 06:38:04 am
What exactly is fixed? Is it the menu not expanding? Is it the error message? Is it both? What version is this fixed in?

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: Editing smart group criteria throws error
December 22, 2011, 06:59:52 pm
Notice mentioned in the post and error in contextMenu plugin has been fixed. It is already part of current stable  release.

Kurund
Found this reply helpful? Support CiviCRM

2ways

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.58
  • PHP version: 5.2.17
Re: Editing smart group criteria throws error
August 13, 2012, 05:49:51 pm
Hi Kurund,

Last night I updated from Drupal 7.12 to 7.15 and then from Civi 4.0.6 to 4.1.5, hoping to get rid of the long lists of notices I was getting, particularly surrounding editing group criteria and mailings.

The most common notice is the "undefined offset" one and they're still hanging around even after my updating and upgrading.  That process all went smoothly, however, no errors, no troubles at all.

Wondering if you could tell me what was causing those notices in the first place, so I can try to track down whether I have managed to blunder my way through whatever foolproof solution has been implemented.

Would really love to get rid of these notices.

Thanks for the help,
Lewis

2ways

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.58
  • PHP version: 5.2.17
Re: Editing smart group criteria throws error
August 13, 2012, 06:33:00 pm
Okay!  Found the culprit.

It has to do with Word Replacements.  Any criteria that involves a word replacement throws up the notices:

-----------
    Notice: Undefined index: where in CRM_Contact_BAO_Query->restWhere() (line 1910 of /home/mysite/www/www/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
    Notice: Undefined offset: 1 in CRM_Contact_BAO_Query->restWhere() (line 1910 of /home/mysite/www/www/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).
-----------

The search works, but I'm guessing that the 'undefined' bit is that it's expecting a different label for that particular field, or something like that.

Still unhappy with the notices, but, at least, at one level, I know what causes them.

Any thoughts on how to resolve this?

Thanks,
Lewis

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: Editing smart group criteria throws error
August 14, 2012, 01:34:50 pm

can you reproduce this on our sandbox server (running 4.2). I tried a wee bit and could not 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

2ways

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.58
  • PHP version: 5.2.17
Re: Editing smart group criteria throws error
August 14, 2012, 02:54:05 pm
Sure.  I'll have a go.

I won't be able to get to it for another 12 hours, I'm afraid.  Wednesdays are rather unforgiving!

Will keep you posted.

Thanks,
Lewis

2ways

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.58
  • PHP version: 5.2.17
Re: Editing smart group criteria throws error
August 15, 2012, 06:45:23 am
Hi Lobo,

I've now tried on the demo and can't reproduce the notices!

I made the first six people in the Summer Volunteer Program work for the Post Office and created three different roles for the six.

I replaced Current Employer with Current Institution and Position with Role.

The word replacements worked fine, of course.  I then configured a couple of different search builder searches: a single line, multiple criteria in an AND group, and then two AND groups joined by OR.  Each search relied on one of the replaced lables, but no notices.

The reality is that I have probably corrupted my database at some point along the way, so that the problem is quite specific to me.  To give you an example of the kind of thing I've done...

I wanted to create a search where I had multiple groups of OR criteria joined by AND, instead of the way Search Builder is currently set up, so, following the advice of someone on this forum (I never said that!), I wrote the search in SQL the way I wanted it, found the table where the searches are saved, and inserted my SQL code into an existing saved search.

I don't know whether it should have worked or not, but it didn't, and it created screens full of notices about the all the horrible things I had done.  I deleted the offending search, but never quite got rid of all the notices.

That's just one example!  Unfortunately, I didn't document very well the notices I was getting, and it's been a long time now since I did that, so can't remember much about it.  I suppose it's possible these notices are a hang over from those misguided attempts to be clever.  Can't be certain.

Anyway, not really sure what to do, if it's my database that's corrupted.  Not sure how to troubleshoot that.  The fact is that the searches work.  Just don't like the notices.

Thanks for your help,
Lewis

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Editing smart group criteria throws error

This forum was archived on 2017-11-26.