Sometimes I cannot remove a group from recipient list of a Mailing. This can happen for instance when I re-use a mailing, but I want to change the group – I can add a new one, but clicking "x" on the old one just triggers "Estimating" label for a while and does not do anything.

Here I cannot remove "Replay" group: enter image description here

After clicking "Next>", I see the recipient group appearing several times (see attached pictures).

enter image description here

How can I debug this? I wasn't able to reproduce this on demo.civicrm.org.

I'm using CiviCRM 4.6.4 with CiviMail 1.0.

edit: I have done some more tests with CiviCRM 4.6.5, where this bug persists.

As I click through all the "new mailing" fields, there are numerous AJAX calls to https://apps.akcjademokracja.pl/crm/civicrm/ajax/rest with entity=Mailing, action=create API call, with json similar to:


as you see, AJAX properly sets "groups":{"include":[6],"exclude":[],"base":[]} but in the database I see more and more civicrm_mailing_group entries:

mysql> select * from civicrm_mailing_group where mailing_id = 23 ; +------+------------+------------+---------------+-----------+-----------+-------------+ | id | mailing_id | group_type | entity_table | entity_id | search_id | search_args | +------+------------+------------+---------------+-----------+-----------+-------------+ | 5596 | 23 | include | civicrm_group | 6 | NULL | NULL | | 5597 | 23 | include | civicrm_group | 6 | NULL | NULL | | 5598 | 23 | include | civicrm_group | 6 | NULL | NULL | +------+------------+------------+---------------+-----------+-----------+-------------+ 3 rows in set (0.00 sec)

Perhaps then, it's a civicrm schema issue – it should force Uniqueness in the table? Or is it rather a backend issue?

  • 2
    I wonder if the group was initially in there more than once. Does this only happen when you re-use an old mailing from before your 4.6 upgrade?
    – Coleman
    Jul 7 '15 at 17:51
  • 1
    Thank you for questions – I discovered some logic in this: This also happens, when I save the Mailing as a draft. When I re-open it, the group is added 3 times. If I click [x] on the list to remove it three times, it gets removed finally. But when I add it again once, and save the Mailing and reopen it again, the group is added 6 times! This is a fresh 4.6.4 install.
    – movonw
    Jul 8 '15 at 9:42
  • could you open your browser debugger (eg. firebug) and check what are the ajax network calls- eg, called once or several time? I don't have the issue, not sure if it's because something on your server or because of the non native english
    – Xavier
    Jul 20 '15 at 10:02
  • @Xavier yes, I'll edit the first post
    – movonw
    Aug 4 '15 at 11:28
  • @movonw, not sure why you would get this issue. The only suggestions:1) upgrade to the latest stable version, clear caches, logout/in and see if the problem persists. 2) try to switch the language to en us (just to eliminate that option)
    – Xavier
    Aug 5 '15 at 11:50

Your Answer

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

Browse other questions tagged or ask your own question.