CRM-10956 Multi-lingual & CiviMail: Mailings (draft, unscheduled, archived) are all missing, cannot send new mailings

    Details

    • Type: Bug
    • Status: Won't Do
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 4.2.0, 4.2.1
    • Fix Version/s: Unscheduled
    • Component/s: CiviMail
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      In multi-lingual installations, CiviMail does not display the mailing archives. It also fails to send out new mailings.

      It's related to the SQL table "civicrm_mailing_group". Instead of having an entity_table = "civicrm_group", I have "civicrm_group_en_US".

      This causes the query in CRM/Mailing/BAO/Mailing.php mailingACLIDs() to fail.

        Attachments

          Issue Links

            Activity

            [CRM-10956] Multi-lingual & CiviMail: Mailings (draft, unscheduled, archived) are all missing, cannot send new mailings
            Jens-Erik Weber added a comment -

            4.2.2 is also affected. For a temporary fix see http://forum.civicrm.org/index.php/topic,26024.msg110406.html#msg110406

            Mathieu Lutfy added a comment -

            I'm not sure how to solve this. I assume it's because of CRM_Core_I18n_Schema::rewriteQuery(), but seems hard to add an exception for this query.

            The relevant SQL query is:

            Oct 23 23:15:06 [info] $INSERT INTO civicrm_mailing_group (mailing_id , group_type , entity_table , entity_id )
            VALUES ( 4 , 'include' , 'civicrm_group_en_US' , 2 ) = civicrm/CRM/Core/Error.php, backtrace, 448
            civicrm/packages/DB/DataObject.php, debug_query, 2359
            civicrm/packages/DB/DataObject.php, _query, 1055
            civicrm/CRM/Core/DAO.php, insert, 287
            civicrm/CRM/Mailing/BAO/Mailing.php, save, 1519
            civicrm/CRM/Mailing/Form/Group.php, create, 438
            civicrm/CRM/Core/Form.php, postProcess, 246
            civicrm/CRM/Core/StateMachine.php, mainProcess, 159
            civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 60
            civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
            civicrm/packages/HTML/QuickForm/Page.php, handle, 103
            civicrm/CRM/Core/Controller.php, handle, 289
            civicrm/CRM/Core/Invoke.php, run, 228
            civicrm/drupal/civicrm.module, invoke, 500

            Donald A. Lobo added a comment -

            the preg is:

            $query = preg_replace("/([^'\"])({$table})([^_'\"])/", "\\1\\2{$dbLocale}
            3", $query);

            doesn't that preg exclude something like 'civicrm_group' (since it starts and ends with a single quote)

            lobo

            Mathieu Lutfy added a comment -

            I applied the temporary fix in CRM/Mailing/BAO/Mailing.php so that civimail works in 4.2.5 for multi-lingual, by recommendation of Lobo. Leaving this open so that we find a better fix.

            Coleman Watts added a comment -

            Mathieu Lutfy is this stil an issue in 4.6 with the new mailing interface?

            Eileen McNaughton added a comment -

            old, surely fixed by now

              People

              • Assignee:
                Mathieu Lutfy
                Reporter:
                Mathieu Lutfy

                Dates

                • Created:
                  Updated:
                  Resolved: