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) »
  • Get an Error when trying to delete some contact
Pages: [1]

Author Topic: Get an Error when trying to delete some contact  (Read 526 times)

emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Get an Error when trying to delete some contact
November 03, 2014, 03:42:51 pm
Hi guys

I am trying to delete some contact from my civicrm 4.2.0 and am getting an error:

Notice: Undefined index: contact_sub_type in CRM_Contact_Selector->addActions() (line 884 of /usr/local/pem/vhosts/133996/webspace/httpdocs/testweb/sites/all/modules/civicrm/CRM/Contact/Selector.php).
Notice: Undefined index: contact_type_orig in CRM_Contact_Selector->addActions() (line 885 of /usr/local/pem/vhosts/133996/webspace/httpdocs/testweb/sites/all/modules/civicrm/CRM/Contact/Selector.php).

Any help would greatly be appreaciated

PS Am using the particular version due to web hosting restrictions
« Last Edit: November 03, 2014, 03:46:51 pm by emmy »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Get an Error when trying to delete some contact
November 03, 2014, 11:24:54 pm
Hi Emmy,
these errors are notices from PHP, not real errors. You can see that because of the Notice: before the actual message So nothing goes wrong or is not processed, they are warnings that the script in question has a few syntax errors (or in this case forgot to check if the contact_sub_type exists). As said, these Notices: are warnings and can be ignored.
Success!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Get an Error when trying to delete some contact
November 04, 2014, 01:53:31 am
Thanks Erik.

But how do I get the required action of deleting the contacts completed. without getting this notice


JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Get an Error when trying to delete some contact
November 04, 2014, 07:55:40 am
Emmy,

Check this out and let us know if it helps?  https://www.ostraining.com/blog/drupal/warnings/

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Get an Error when trying to delete some contact
November 04, 2014, 09:03:51 am
Hi Jon

That was very helpful thank you.

But I would like to be able to delete the selected contacts.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Get an Error when trying to delete some contact
November 04, 2014, 10:23:55 am
Hi Emmy,
the notices should not prevent you to delete the contacts. The warnings are simply warnings that show up but do not prevent the processing to complete. If I get a warning like that when I delete a contact, the contact is still deleted? So you are confusing us a bit :-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Get an Error when trying to delete some contact
November 04, 2014, 10:43:48 am
Hi Erik

So sorry about the confusion but I will explain myself a bit better.

I did an import of some contacts from my old civicrm platform to the new current version that am using.

Now I did not have an easy time of it (importing data) and before I knew it I forgotten to assign the imported contacts to a specific contact group.

I did a custom search and found the records (contacts) that imported. They were about 2500 contact.

I have tried to DELETE PERMANENTLY, and a few other Actions and the result is that Warning notice.

And if I go ahead with the process a message is returned informing me that "0 contacts have been deleted.

:( 

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Get an Error when trying to delete some contact
November 04, 2014, 10:52:51 am
This is the first it's been mentioned that this is via a custom search - it's quite likely there's an issue with the custom search in the version you're using.  Which custom search is it?  Is it "Date Added to CiviCRM"?

Rather than delete the contacts - are you able to add them to a group?  If so, you probably don't need to delete them.  Or you can add them to a group, then find them using another search.

You can also probably find these folks via Search Builder, using the Contact ID field (they should all be consecutive). Does the problem happen there as well?
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Get an Error when trying to delete some contact
November 04, 2014, 03:01:02 pm
Hi Jon,

I finally managed to get those records deleted.

I was using custom search: "Date Added to CiviCRM"? and it did have issues so I followed your instructions and used Search Builder and was able to permanently delete them.

Thanks for you instructions very helpful ;)

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Get an Error when trying to delete some contact
November 06, 2014, 09:57:49 am
Glad you managed to do this Emmy :-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Get an Error when trying to delete some contact

This forum was archived on 2017-11-26.