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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.4.4 to 4.4.6 - possible bug?
Pages: [1]

Author Topic: Upgrade from 4.4.4 to 4.4.6 - possible bug?  (Read 902 times)

JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 24, 2014, 03:52:29 pm
Hi. I have just upgraded from 4.4.4 to 4.4.6. All seemed to go well and the upgrade completed as normal.

On checking through CiviCRM I have found that I now have something odd happening when I use the Edit button to update a contact record. All fields / options are fine apart from Groups. I can change them fine but when you click save (or save and new) from within the edit screen it throws up the following error message and then completely resets ALL groups for the record to Past Groups and shows them as Removed (by Admin).

This is the error message:

Error messageWarning: array_key_exists() expects parameter 2 to be array, null given in CRM_Contact_Form_Contact->postProcess() (line 978 of /home/admin/public_html/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php).

If I try and edit the record without using the Edit button all works fine and there are no problems. Groups remain set and no error message is displayed.

From what I can tell this looks like a problem with the Save button code.

Can anyone throw any light on this?

At the moment we have stopped using the Edit button until this is resolved.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 24, 2014, 05:54:26 pm
Tested and could not reproduce this issue on http://drupal.demo.civicrm.org/ (demo site, currently showing version 4.4.7).
@xurizaemon ● www.fuzion.co.nz

JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 24, 2014, 11:53:30 pm
Thanks Chris. I have also checked this on the demo site - again unable to reproduce error.

Since posting this problem I have had a closer look at the forum and found another member who has had a similar issue with 4.4.3 see https://forum.civicrm.org/index.php/topic,32210.msg137791.html#msg137791

I don't think this is to do with permissions - everything seems to work fine until I use the edit button. Interestingly, if I remove all of the selected groups the record saves correctly. It is only when the groups are set that using the edit button fails.

I think the clue is in the above error message....has the save button code changed since 4.4.3?

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 25, 2014, 02:03:02 am
I wondered if you and the other reporter might be using the same browser - information like that might shed some light.

Also interesting that the screenshot in the other shows the longest group name as being affected ... does this bug happen on the demo if you copy your site's group names across verbatim?
@xurizaemon ● www.fuzion.co.nz

JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 25, 2014, 03:38:55 pm
Thanks Chris. I have checked using IE, Firefox and Chrome and the error is thrown up on all browsers.

Interesting about the length of the group name - I will have a play around with this when I have a moment. We do have a couple of long names - are you aware of any length restrictions in the code behind the save button? It's very odd that you can save changes to the groups fine but as soon as you use the edit button option it throws up an error and dumps all of them. Everything else on the record seems fine.

One further thought...we're there any changes to the edit button function between 4.4.3 and 4.4.4? I have found a couple of records that seem to have had their groups dropped during this time.
« Last Edit: July 25, 2014, 03:40:49 pm by JohnM »

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 25, 2014, 03:56:39 pm
I'm not aware of any name length restrictions, but my eye catches things like that when debugging. See if your group names work on demo?
@xurizaemon ● www.fuzion.co.nz

JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 26, 2014, 04:11:01 am
Hi Chris. Problem sorted! This is definitely a bug that needs looking at. I managed to replicate the error on the demo site.

This is what is going on....

From Administer > Customize Data and Screens > Display Preferences > Editing Contacts untick the Tags and Groups option. (On our site I don't display this panel). I then went to a contact record that was working fine previously, clicked on the Edit Button and then clicked Save without changing anything. This resulted in the following error message plus dropped all groups out of the record...

    Notice: Undefined index: group in CRM_Contact_Form_Contact->postProcess() (line 978 of /home/webeditor/jenkins-node/workspace/buildkit-demos.civicrm.org/build/d7-demo/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php).
    Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Contact_Form_Contact->postProcess() (line 978 of /home/webeditor/jenkins-node/workspace/buildkit-demos.civicrm.org/build/d7-demo/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php).

I went back to the above 'Tags and Groups' option, reticked it and now the record can be edited successfully using the Edit button.

To confirm everything is ok on my site...I went to Administer > Customize Data and Screens > Display Preferences > Editing Contacts and then ticked the 'Tags and Groups' option. All is working fine now. No more error messages and no more problems with groups being removed.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 26, 2014, 12:54:05 pm
Great work! To put this on the radar for fixing, you can register an account on issues.CiviCRM.org and create an issue there. Give steps to document as you've done here.

Thanks for tracking it down.

Edit: you're part way through this list - https://civicrm.org/bug-reporting
@xurizaemon ● www.fuzion.co.nz

JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Re: Upgrade from 4.4.4 to 4.4.6 - possible bug?
July 26, 2014, 03:48:33 pm
Thanks Chris. Bug now referred to CiviCRM.org for fixing.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.4.4 to 4.4.6 - possible bug?

This forum was archived on 2017-11-26.