Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1173 CiviMail: mailing header/footer should not be required
  3. CRM-1458

CiviMail: throws failed foreign key constraint when attempting to send without header and footer

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6
    • Component/s: CiviMail
    • Labels:
      None

      Description

      The following is thrown after "send now" in the final screen.

      Problem appears to be that not having header_id or footer_id causes the FK constraint to croak.

      error

      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -3
      [message] => DB Error: constraint violation
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_mailing (domain_id , reply_id , unsubscribe_id , optout_id , name , from_name , from_email , replyto_email , subject , body_text , body_html , is_template , url_tracking , forward_replies , auto_responder , open_tracking , is_completed ) VALUES ( 1 , 7 , 5 , 6 , 'test final? 2' , 'yo' , 'brush@tryonfarm.org' , 'brush@tryonfarm.org' , 'test' , ... , 0 , 1 , 1 , 0 , 1 , 0 ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_mailing (domain_id , reply_id , unsubscribe_id , optout_id , name , from_name , from_email , replyto_email , subject , body_text , body_html , is_template , url_tracking , forward_replies , auto_responder , open_tracking , is_completed ) VALUES ( 1 , 7 , 5 , 6 , 'test final? 2' , 'yo' , 'brush@tryonfarm.org' , 'brush@tryonfarm.org' , 'test' , ... , 0 , 1 , 1 , 0 , 1 , 0 ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
      [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_mailing (domain_id , reply_id , unsubscribe_id , optout_id , name , from_name , from_email , replyto_email , subject , body_text , body_html , is_template , url_tracking , forward_replies , auto_responder , open_tracking , is_completed ) VALUES ( 1 , 7 , 5 , 6 , 'test final? 2' , 'yo' , 'brush@tryonfarm.org' , 'brush@tryonfarm.org' , 'test' , ..., 0 , 1 , 1 , 0 , 1 , 0 ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]"]
      )

        Attachments

          Activity

            People

            • Assignee:
              pankaj Pankaj Sharma
              Reporter:
              brush j. brush
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: