2

Recently I upgraded:

Drupal core to 7.57

PHP from 5.6 to 7.0.28-1

CiviCRM from 4.7.27 to 4.7.31

Since I've done so I can't send mailings. Basically I get the same thing like in the post described here

When I select a group to send the mailing to, it says no recipients. And when I click send the mailing is listed as completed with 0 deliveries.

This is what I get in my php error log

[Tue Mar 27 10:02:14.592307 2018] [:error] [pid 10110] [client ip:45513] PHP Fatal error: Uncaught Error: Call to undefined function module_invoke_all() in /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php:857\nStack trace:\n#0 /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System.php(1413): CRM_Utils_System_Drupal->onCiviExit()\n#1 /var/www/mysite/sites/all/modules/civicrm/extern/url.php(62): CRM_Utils_System::civiExit()\n#2 {main}\n thrown in /var/www/mysite/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 857, referer: https://mysite.org/civicrm/mailing/view?reset=1&id=709

I tried cleaning cache (drupal and civicrm) but it doesn't fix it. Rebuilding the smart groups didn't help either.

EDIT

This problem seems to be groups related and not mailing related. CiviCRM log is clean, and single mails work just fine.

EDIT2

However when I'm selecting mail recipients if I select recipients from previous mailings it counts them as it should but it doens't for groups (smart or regular).

EDIT 3

This seems to be an issue with multilingual installations.

The issue can be replicated by adding another language and then turning on Multiple Languages Support. After this the problem appears and disappears again when Multiple Languages Support is switched off.

4.7.27 was working, not sure whether the problem first appeared with 4.7.28, 4.7.29, 4.7.30 or 4.7.31

I updated this issue on Jira

2
  • I don't think this log file errors are the reason for not sending the mails, but you should try applying github.com/civicrm/civicrm-core/pull/11712 on your site to avoid the displayed errors in logs. Commented Mar 27, 2018 at 11:28
  • Yeah I just came to the same realization. Thanks! But I have no clue as to why I have 0 recipients. This appears as nothing to do with mailing, it's as if the groups are empty, sending out testmails and single mails works just fine.
    – Marko
    Commented Mar 27, 2018 at 11:38

2 Answers 2

4

The issue was affecting multilingual installations. If the multilingual support is turned off in the settings everything works.

Applying the fix solves the problem for multilingual installations.

You can see the @monishdeb's fix on github, the fix will be included in the next version.

And here's the patchfile I used

131c131
<              ->where('mailing_id = #mailing_id AND entity_table IN ("!groupTableName", "civicrm_mailing")')
---
>              ->where('mailing_id = #mailing_id AND entity_table IN ("civicrm_group", "civicrm_mailing")')
133d132
<              ->param('!groupTableName', CRM_Contact_BAO_Group::getTableName())
1

This seems to be related to upgrading to 4.7.31. Upgrading it to 4.7.30 does not seem to cause this problem.

See these two other questions about the exact same problem with 4.7.31:

CiviMail - 'No recipients': nothing added to table civicrm_mailing_recipients

After upgrade to 4.7.31 send mail - recipients - "no recepients"

3
  • Hey, @Tom B. did was your CiviCRM instance multilanguage?
    – Marko
    Commented Mar 30, 2018 at 19:53
  • Yes, a multilingual installation.
    – Tom B.
    Commented Mar 30, 2018 at 23:46
  • Yeah, that's it. All of us had multilingual installation.
    – Marko
    Commented Mar 31, 2018 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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