Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20016

Fatal error processing bounces when email_id IS NULL

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.15
    • Fix Version/s: 4.7.17
    • Component/s: CiviMail
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      I happened to look in the log & saw a bunch of errors like this

      SELECT count(civicrm_mailing_event_bounce.id) as bounces,
      civicrm_mailing_bounce_type.hold_threshold as threshold
      FROM civicrm_mailing_event_bounce
      INNER JOIN civicrm_mailing_bounce_type
      ON civicrm_mailing_event_bounce.bounce_type_id = civicrm_mailing_bounce_type.id
      INNER JOIN civicrm_mailing_event_queue
      ON civicrm_mailing_event_bounce.event_queue_id = civicrm_mailing_event_queue.id
      INNER JOIN civicrm_email
      ON civicrm_mailing_event_queue.email_id = civicrm_email.id
      WHERE civicrm_email.id =
      AND (civicrm_email.reset_date IS NULL
      OR civicrm_mailing_event_bounce.time_stamp >= civicrm_email.reset_date)
      GROUP BY civicrm_mailing_event_bounce.bounce_type_id
      ORDER BY threshold, bounces desc [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds
      to your MariaDB server version for the right syntax to use near 'AND (civicrm_email.reset_date IS NULL
      OR civicrm_ma' at line 11]"

      On checking civicrm_mailing_event_queue.email_id is an optional field and if you delete an email that you have sent a civimail to then it will null that field.

      Once any one email in the mailing job has been nulled it is then impossible to process any more messages. This would potentially completely block bounce processing but unfortunately it is a silent failure (at least the way we are calling it)

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: