Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11052

'recent' CiviMails not visible on Multilingual site

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.2.3
    • Component/s: CiviMail
    • Labels:
      None

      Description

      Some CiviMails are inaccessible on a Multilingual site (these are more recent ones but I can't pinpoint the change incident).

      In the civicrm_mailing_group table some rows have an entity_table of 'civicrm_group' whereas others have 'civicrm_group_en_US'. (The more recent ones have the second).

      The ACL clause restricts accessible mailings to those where entity_table = 'civicrm_group'. I'm not sure if this is a storage or retrieval problem but the easiest & safest fix appears to be changing this to entity_table LIKE 'civicrm_group%'

      e,g

      Index: CRM/Mailing/BAO/Mailing.php
      ===================================================================
      — CRM/Mailing/BAO/Mailing.php (revision 42585)
      +++ CRM/Mailing/BAO/Mailing.php (working copy)
      @@ -2076,7 +2076,7 @@
      $query = "
      SELECT $selectClause
      FROM civicrm_mailing m
      LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id

      • WHERE ( ( g.entity_table = 'civicrm_group' AND g.entity_id IN ( $groupIDs ) )
        WHERE ( ( g.entity_table LIKE 'civicrm_group%' AND g.entity_id IN ( $groupIDs ) )
        OR ( g.entity_table IS NULL AND g.entity_id IS NULL ) )
        $condition";

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: