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 CiviMail (Moderator: Piotr Szotkowski) »
  • Mailing removed from list if group deleted
Pages: [1]

Author Topic: Mailing removed from list if group deleted  (Read 865 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Mailing removed from list if group deleted
July 29, 2009, 10:03:50 am
Had an interesting situation -- client reported some of their past mailings were not listed in the scheduled/past mailings list. The records were appearing in civicrm_mailing, they were not archived, and from everything I could tell by reviewing the db, they were no different than any other mailing records.

I took a look at the queries for that page, and found that there was a dependency on civicrm_mailing_group.entity_id, which is a FK to civicrm_group.id. The issue was that some of the missing mailings used a Group that was later deleted from the system. Because the id did not exist, the query broke down and the mailing record did not display.

I don't think the mailing records should be dependent on the existence of the group. Since CiviMail is very dependent on groups, it's not uncommon for people to create a temporary group in order to run a mailing, and then remove that group at a later date when it's no longer needed. But the record of the mailing should remain. The mailing report page, which currently has a hotlink to the groups included in the mailing, should be altered so that it's only linkable if the group exists. CiviMail logs the actual recipients/bounces so that is not dependent on groups.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Mailing removed from list if group deleted
July 29, 2009, 10:29:24 am
I modified CRM/Mailing/BAO/Mailing.php
around lines 1670

Removed last clause of the sql query so that it doesn't filter by group. That has ACL implications, so it's not a real fix. But something around there needs to be reworked.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mailing removed from list if group deleted

This forum was archived on 2017-11-26.