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 CiviMail (Moderator: Piotr Szotkowski) »
  • civicrm_mail FK of mail_job (can't delete a mailing)
Pages: [1]

Author Topic: civicrm_mail FK of mail_job (can't delete a mailing)  (Read 741 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
civicrm_mail FK of mail_job (can't delete a mailing)
October 25, 2010, 01:16:54 pm
Hi,

Can't delete a mailing that has started (on 3.3):

    [debug_info] => DELETE FROM civicrm_mailing  WHERE (  civicrm_mailing.id = 47 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`civicrm_pes_org/civicrm_mailing_job`, CONSTRAINT `parent_id` FOREIGN KEY (`parent_id`) REFERENCES `civicrm_mailing_job` (`id`))]


Is this normal ? should it be a on delete cascade instead ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: civicrm_mail FK of mail_job (can't delete a mailing)
November 02, 2010, 11:08:52 am
Quote from: xavier on October 25, 2010, 01:16:54 pm
Can't delete a mailing that has started (on 3.3):

    [debug_info] => DELETE FROM civicrm_mailing  WHERE (  civicrm_mailing.id = 47 )  [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`civicrm_pes_org/civicrm_mailing_job`, CONSTRAINT `parent_id` FOREIGN KEY (`parent_id`) REFERENCES `civicrm_mailing_job` (`id`))]

Argh, that’s bad.

Quote
Is this normal ? should it be a on delete cascade instead ?

Can you check your db? It actually is ON DELETE CASCADE in the current 3.3 codebase…
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

jase700

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
Re: civicrm_mail FK of mail_job (can't delete a mailing)
December 20, 2010, 08:26:23 am
I'm having the same problem in 3.3.1 after upgrading from 3.1.4.  They just say running and I can't get them to either cancel or stop.

sushant

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 8
  • CiviCRM version: v3.2.x,v3.3.x v4.0.x, v4.x,trunk
  • CMS version: Drupal 6/7 ,joomla 1.5,1.6
  • MySQL version: 5.1.51
  • PHP version: 5.3.3
Re: civicrm_mail FK of mail_job (can't delete a mailing)
December 20, 2010, 09:35:36 pm
Hi jase700,
This is fixed under http://issues.civicrm.org/jira/browse/CRM-7197 for CiviCRM v3.3.2.
Following is the patch that might be help u
https://fisheye2.atlassian.com/changelog/CiviCRM?cs=31159

Sushant
CiviCRM Priority Support
http://support.civigardens.com/
http://osseed.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • civicrm_mail FK of mail_job (can't delete a mailing)

This forum was archived on 2017-11-26.