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) »
  • Mailings never marked as "complete"
Pages: [1]

Author Topic: Mailings never marked as "complete"  (Read 828 times)

Micah Lee

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 4
  • CiviCRM version: 4.1.0
  • CMS version: Drupal 7
  • MySQL version: 5.1.49
  • PHP version: 5.3.3
Mailings never marked as "complete"
November 22, 2011, 03:50:08 pm
I just modified CRM/Mailing/Form/Upload.php to comment out the block of code that validates tokens:

Code: [Select]
583             /* First look for missing tokens */
584             $err = CRM_Utils_Token::requiredTokens($str);
585             if ($err !== true) {
586                 foreach ($err as $token => $desc) {
587                     $dataErrors[]   = '<li>'
588                         . ts('This message is missing a required token - {%1}: %2',
589                              array(1 => $token, 2 => $desc))
590                         . '</li>';
591                 }
592             }

We have a link in our email footer that brings you to a profile that lets you opt out of email, and so we don't need the email opt out token in our template.

I sent some test mailings and confirmed that it works. But the weird part is the mailing started and finished successfully, but are still marked as "Running" and not "Complete". I rolled back my change and sent a new mailing while it still validates for tokens and ran into the same problem -- the mailings are not getting marked as "Complete" even though 100% of the emails have been delivered successfully. This token change is the only thing that I've changed that might have affected it that I can think of.

Any thoughts on how I can troubleshoot this problem?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mailings never marked as "complete"
November 23, 2011, 07:02:41 am

can u run the foll query for one of the non-completed child jobs:

Code: [Select]
SELECT      civicrm_mailing_event_queue.id,
            civicrm_email.email as email,
            civicrm_mailing_event_queue.contact_id,
            civicrm_mailing_event_queue.hash
FROM        civicrm_mailing_event_queue
INNER JOIN  civicrm_email
        ON  civicrm_mailing_event_queue.email_id = civicrm_email.id
INNER JOIN  civicrm_contact
        ON  civicrm_contact.id = civicrm_email.contact_id
LEFT JOIN   civicrm_mailing_event_delivered
        ON  civicrm_mailing_event_queue.id = civicrm_mailing_event_delivered.event_queue_id
LEFT JOIN   civicrm_mailing_event_bounce
        ON  civicrm_mailing_event_queue.id = civicrm_mailing_event_bounce.event_queue_id
WHERE       civicrm_mailing_event_queue.job_id = CHILD_JOB_ID_HERE
    AND     civicrm_mailing_event_delivered.id IS null
    AND     civicrm_mailing_event_bounce.id IS null
    AND     civicrm_contact.is_opt_out = 0
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mailings never marked as "complete"

This forum was archived on 2017-11-26.