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

unable to send bulk mailings - DB Error: unknown error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.10
    • Fix Version/s: None
    • Component/s: CiviMail
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      I have recently installed civicrm 4.6.10 on Drupal 7.38. There was 4.6.8 installed before, but I removed it and installed a new one rather than upgrading it (I am using previous versions of civicrm on a few other sites and they seem to work fine)

      After configuring mail settings, I am able to send individual emails to contacts, however when I tried bulk mailing option I am receiving error messages.

      Steps I made..

      Click on New Mailing
      Create mailing name
      add recipients (1 group with 3 contacts only)
      Create subject and email body
      Top-right status says "Saving" then "Saved" ( draft was saved successfully)
      Recipients status says "Estimating".

      No matter how long I wait recipient status still says "estimating", when I click on recipient status I get error message:

      Error in call to MailingJob_create : DB Constraint Violation - possibly mailing_id should possibly be marked as mandatory for this API. If so, please raise a bug report

      When I try to send test email I get following message:

      Error in call to Mailing_send_test : Error in call to MailingJob_create : DB Constraint Violation - possibly mailing_id should possibly be marked as mandatory for this API. If so, please raise a bug report

      when I try to submit mailing I get this message:

      DB Error: unknown error

      This is what I get from logs:

      Dec 01 10:17:59 [info] $backTrace = #0 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(897): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error))
      #2 /var/www/html/drupal/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #4 /var/www/html/drupal/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #5 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...", "DB_Error", TRUE)
      #6 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1787 ** When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEM...")
      #7 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
      #8 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #9 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #10 /var/www/html/drupal/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #11 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Core/DAO.php(325): DB_DataObject->query("CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #12 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(205): CRM_Core_DAO->query("CREATE TEMPORARY TABLE X_81\n (contact_id int primary key)\n ...")
      #13 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php(74): CRM_Mailing_BAO_Mailing::getRecipients(81, "7", NULL, NULL, TRUE, "1")
      #14 [internal function](): CRM_Mailing_BAO_MailingJob::create((Array:11))
      #15 /var/www/html/drupal/sites/all/modules/civicrm/api/v3/utils.php(1279): call_user_func_array((Array:2), (Array:1))
      #16 /var/www/html/drupal/sites/all/modules/civicrm/api/v3/MailingJob.php(44): _civicrm_api3_basic_create("CRM_Mailing_BAO_MailingJob", (Array:11))
      #17 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_job_create((Array:11))
      #18 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php(96): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
      #19 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(196): Civi\API\Kernel->run("mailing_job", "create", (Array:8))
      #20 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(72): Civi\API\Subscriber\ChainSubscriber->callNestedApi(Object(Civi\API\Kernel), (Array:37), (Array:5), "create", "Mailing", 3)
      #21 [internal function](): Civi\API\Subscriber\ChainSubscriber->onApiRespond(Object(Civi\API\Event\RespondEvent))
      #22 /var/www/html/drupal/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\API\Event\RespondEvent))
      #23 /var/www/html/drupal/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:4), "api.respond", Object(Civi\API\Event\RespondEvent))
      #24 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php(221): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("api.respond", Object(Civi\API\Event\RespondEvent))
      #25 /var/www/html/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php(98): Civi\API\Kernel->respond(Object(Civi\API\Provider\MagicFunctionProvider), (Array:9), (Array:5))
      #26 /var/www/html/drupal/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->run("Mailing", "create", (Array:37), NULL)
      #27 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Utils/REST.php(404): civicrm_api("Mailing", "create", (Array:37))
      #28 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Utils/REST.php(640): CRM_Utils_REST::process((Array:3), (Array:35))
      #29 [internal function](): CRM_Utils_REST::ajax()
      #30 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
      #31 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
      #32 /var/www/html/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
      #33 /var/www/html/drupal/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
      #34 [internal function](): civicrm_invoke("ajax", "rest")
      #35 /var/www/html/drupal/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
      #36 /var/www/html/drupal/index.php(21): menu_execute_active_handler()
      #37

      {main}

      UPDATE 2015/12/02: I have reinstalled an older version 4.6.8, but the issue remained. I then have reinstalled much older version 4.5.6 that is working for me on other sites and the issue was gone! I am now able to send bulk mailings. Would still be good to get this issue sorted for newer civicrm versions, perhaps it is related to a version of drupal 7.38 I am using?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rutamarga Ruta Marga
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: