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 CiviSMS »
  • Can send SMS by bulk action (off of a search) but not Bulk SMS
Pages: [1] 2

Author Topic: Can send SMS by bulk action (off of a search) but not Bulk SMS  (Read 3994 times)

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Can send SMS by bulk action (off of a search) but not Bulk SMS
March 08, 2013, 01:24:55 pm
So... when I choose a group of recipients, I can choose "Send SMS" from the action menu and easily send an SMS to each of them.

However, when I choose the same group and try to send a bulk SMS, some people get SMS, some get many of the same SMS, and some get nothing.

Anyone else figured this one out?

Thanks!
-tiffani


invisible ink

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
April 25, 2013, 11:45:53 am
I am having this same problem....did you find a resolution?

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
April 30, 2013, 02:26:57 pm
I haven't.  I just upgraded to 4.3 and I was hoping that that would solve the problem -- but it looks like you're already upgraded.

Sorry not to have more info.

Flying

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
    • Mission Aviation Fellowship - Norway
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7
  • MySQL version: I am an end-user, why should I care about MySQL-versions?
  • PHP version: I don't (want to) know...!
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 04, 2014, 07:18:43 am
I met the same problem ( I think)...

It seems as bulk-sms is only sending to those contacts that have an active e-Mail adress.

I suspect a legacy problem of code from bulk e-Mail onto bulk-sms.

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: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 04, 2014, 08:23:08 am

hey maf:

i suspect the legacy issue of using the same code and queries as civimail (they share a lot of the same codebase)

any chance u can get the civi-coop folks to take a look, debug and file a PR against this.Would be good to get it sorted out

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Flying

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
    • Mission Aviation Fellowship - Norway
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7
  • MySQL version: I am an end-user, why should I care about MySQL-versions?
  • PHP version: I don't (want to) know...!
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 04, 2014, 08:29:16 am
Thanks lobo!

I have already put Jaap on the issue!
Good to hear that you share the same suspicion.

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 04, 2014, 11:56:04 pm
I am looking into the issue and if see a solution I can see if I can make a PR. Will keep you posted about it
Developer at Edeveloper / CiviCoop

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 05, 2014, 12:35:10 am
At a first look all the bulk mailing code looks fine. So it needs some further investigation. has someone an idea where exactly the code might break?
Developer at Edeveloper / CiviCoop

Flying

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
    • Mission Aviation Fellowship - Norway
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7
  • MySQL version: I am an end-user, why should I care about MySQL-versions?
  • PHP version: I don't (want to) know...!
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 05, 2014, 12:46:00 am
Hi Jaap!

A long-shot, but could this access control issue be somewhat related:

http://forum.civicrm.org/index.php/topic,29031.0.html

This is at least something that shows that the code is still interdependent on bulk-mail.

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 07, 2014, 04:07:37 am
we have discovered that it is a token related issue. We haven't figured out what exactly the problem is. But we know which token is causing the problems.
Developer at Edeveloper / CiviCoop

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 09, 2014, 02:48:41 am
An update it was not in the token. There was an error in sms delivery which is the same functionality as mail delivery and which inserted a condition for token values if a contact has an e-mail. The problem is related to https://issues.civicrm.org/jira/browse/CRM-3798 but that issue solved another problem....
Developer at Edeveloper / CiviCoop

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 09, 2014, 02:52:04 am
The solution is to change CRM_Mailing_BAO_Job at line 585:

from
Code: [Select]
public function deliverGroup(&$fields, &$mailing, &$mailer, &$job_date, &$attachments) {
    static $smtpConnectionErrors = 0;

    if (!is_object($mailer) || empty($fields)) {
      CRM_Core_Error::fatal();
    }

    // get the return properties
    $returnProperties = $mailing->getReturnProperties();
    $params           = $targetParams = $deliveredParams = array();
    $count            = 0;

    foreach ($fields as $key => $field) {
      $params[] = $field['contact_id'];
    }
    $details = CRM_Utils_Token::getTokenDetails(
      $params,
      $returnProperties,
      TRUE, TRUE, NULL,
      $mailing->getFlattenedTokens(),
      get_class($this),
      $this->id
    );

To
Code: [Select]
public function deliverGroup(&$fields, &$mailing, &$mailer, &$job_date, &$attachments) {
    static $smtpConnectionErrors = 0;

    if (!is_object($mailer) || empty($fields)) {
      CRM_Core_Error::fatal();
    }

    // get the return properties
    $returnProperties = $mailing->getReturnProperties();
    $params           = $targetParams = $deliveredParams = array();
    $count            = 0;
    $skipOnHold = true; //do include a statement to check wether e-mail address is on hold
    if ($mailing->sms_provider_id) {
      $skipOnHold = false;
    }

    foreach ($fields as $key => $field) {
      $params[] = $field['contact_id'];
    }
    $details = CRM_Utils_Token::getTokenDetails(
      $params,
      $returnProperties,
      $skipOnHold, TRUE, NULL,
      $mailing->getFlattenedTokens(),
      get_class($this),
      $this->id
    );
Developer at Edeveloper / CiviCoop

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 09, 2014, 03:16:37 am
I have also filed an issue under: https://issues.civicrm.org/jira/browse/CRM-15702
Developer at Edeveloper / CiviCoop

Flying

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
    • Mission Aviation Fellowship - Norway
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7
  • MySQL version: I am an end-user, why should I care about MySQL-versions?
  • PHP version: I don't (want to) know...!
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 10, 2014, 01:10:12 am
I sent around 2000 sms using the bulk sms yesterday.
So it is working!

However, 4 people didn’t receive a sms, and what is common for all of them, is that they have ticked off for no bulk e-mail. This is not what I expected, so if there is some code checking for that as well, (at the place you fixed yesterday) this would be relevant to fix as well.

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Can send SMS by bulk action (off of a search) but not Bulk SMS
December 10, 2014, 01:41:54 am
About the no bulk mail option. That one indeed affects the sending of SMS. But I am not sure whether it is a bug or a required functionality. In case of the MAF we can decide whether it is a bug or not... However in more general what do others think about this issue. Is it required to prevent sendnig SMS if a contact has opt out for bulk mailings? In other words could the bulk sms be considered as a bulk mailing?
Developer at Edeveloper / CiviCoop

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviSMS »
  • Can send SMS by bulk action (off of a search) but not Bulk SMS

This forum was archived on 2017-11-26.