1

I'm getting an error message on scheduled SMS.

Finished execution of Send Scheduled SMS with result: Failure, Error message: DB Error: syntax error

I'm running 4.7.8 and I think it was stable in 4.7.6. My WP install is 4.5.3

7
  • Are you able to send an individual SMS without error? What service provider are you using for your SMS? Jun 28 '16 at 5:27
  • 1
    More details about the DB error should be available in your CiviCRM debug log (instructions to locate). If you find the "DB Error" in that logfile and share the backtrace here, you'll be able to get a more informed answer. Make sure no sensitive data (eg SMS provider login) is included :) Jun 28 '16 at 9:23
  • Thanks guys, I will get onto that. The provider is Clickatell and the system works when I send on test SMS.
    – PeteRoss
    Jun 29 '16 at 6:28
  • Finally had a chance to get back to this one. End of financial year is a killer! db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="
    – PeteRoss
    Jul 7 '16 at 4:11
  • @Chris Burgess How do I load the entire backtrace here? It's a bit long. Thanks!
    – PeteRoss
    Jul 7 '16 at 4:17
3

This error does show up in Civi 4.7.8 on Drupal 7.x. @PeteRoss Thanks. Haven't had chance to upgrade to 4.7.9 yet.

Had to send scheduled event SMS to members, so modified sql in if statement in CRM/Mailing/BAO/MailingJob.php

525 if ($mailing->sms_provider_id) { .... .... 546 OR contact_a.do_not_sms = 0 ) - 547 $aclWhere}"; + 547 $aclWhere"; 548 }

The scheduled SMS job completed successfully after the modification.

2
1

It appears that Civi on WordPress was throwing an extra } into the query from the file Mailingjob.php line 547. I hope this helps someone else and is there some way we can check if this affects others?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.