After upgrade to 4.7.31 / working with Wordpress 4.9.4
I face problems with sending mass e-mails (Rundschreiben): I can choose groups (mailing list groups) in the recipients section, but the estimation shows "no recepients"; I can send test emails to a single email address or a group, and it works. I can start the sending process, but no e-mails are being sent. Any hints on how to solve this problem?
-
Can you post the AJAX POST request when you add the group to the list, and what response you get? yoursite.de/civicrm/ajax/rest– Tom B.Mar 25, 2018 at 13:30
-
I checked the reponses and they look identhical to the responses I get on a working website {"is_error":0,"version":3,"count":1,"id":0,"values":[{"id":"79","label":"Test","description":[],"extra":{"is_hidden":"0"}}],"page_num":1} So I guess the problem is in the next step, adding contacts who belong to the selected group.– MarkoMar 27, 2018 at 14:04
-
Thanks for your posts. I could solve the problem only by going back to a previous CiviCrm version via a backup.– user2445Mar 28, 2018 at 15:33
-
Hm, it seems I will have to do that as well. It seems that @TomB. solved the problem by redoing the upgrade, so i guess I will try that if no one has a solution in a couple of days. I posted this issue on jira.– MarkoMar 28, 2018 at 18:08
-
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 or 4.7.30 Still waiting for the actual solution– MarkoMar 30, 2018 at 20:47
3 Answers
I resolved this by going to Adminstrater > System Settings > Clean up cache and update paths. Click the Clean up cache button.
-
Thanks for your reply. Unfortunately it seemed not to have worked for me.– user2445Mar 21, 2018 at 15:42
-
1If your group is a smart group, make sure your rebuild smart group cache scheduled job is enabled. Also make sure your Clean up temporary data and files scheduled job is enabled and maybe manually execute it. In my case, the system was still pointing to the previous civi version files, when i cleaned up the cache, that resolved it.– fdarnMar 21, 2018 at 16:01
-
Thanks a lot. Could you tell me where I can check the rebuild smart group cache scheduled job & Clean up temporary data and files scheduled job– user2445Mar 21, 2018 at 18:57
-
Ah I found them. Scheduled jobs. Rebuild smart group cache was disabled.– user2445Mar 21, 2018 at 19:03
-
I did some extensive debugging, looking at the various SQL queries and found the following problem that affects those of us not using en_US as the language:
./CRM/Mailing/BAO/Mailing.php has the getRecipients function, and it has the following line: $dao = CRM_Utils_SQL_Select::from('civicrm_mailing_group') ->select('GROUP_CONCAT(entity_id SEPARATOR ",") as group_ids, group_type, entity_table') ->where('mailing_id = #mailing_id AND entity_table IN ("civicrm_group", "civicrm_mailing")') ->groupBy(array('group_type', 'entity_table')) ->param('#mailing_id', $mailingID) ->execute();
The problem is that for non-en_US languages, civicrm_mailing_group table has the language-specific view as the entity table, so in my case civicrm_group_en_GB, not civicrm_group, so the recipients are never found. This code snippet solves the problem - I've yet to submit a patch.
$mailingGroup = new CRM_Mailing_DAO_MailingGroup();
$mgtable = CRM_Mailing_DAO_MailingGroup::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$recipientsGroup = $excludeSmartGroupIDs = $includeSmartGroupIDs = $priorMailingIDs = array();
$dao = CRM_Utils_SQL_Select::from($mgtable)
->select('GROUP_CONCAT(entity_id SEPARATOR ",") as group_ids, group_type, entity_table')
->where('mailing_id = #mailing_id AND entity_table IN ("' . $group . '", "' . $mailing . '")')
->groupBy(array('group_type', 'entity_table'))
->param('#mailing_id', $mailingID)
->execute();
This bug is marked as being fixed in 5.0 - you should upgrade to the latest release (currently 5.1.2) to get the fix