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

Creation of new financial batch fails

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      4.3 upgrade needs to change civicrm_batch.item_count column constraint to allow NULL (this column's constraint was set as REQUIRED in 4.2).

      ---- Original Post —
      When I click "Contributions ... Accounting Batches ... New Batch", then fill in just the batch name and click save, I get an sql error. ( I am leaving all the optional fields blank)

      The full stack trace is:
      #0 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home/dev17/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB.php(972): PEAR_Error->PEAR_Error("DB Error: ", "a515ac9c2796ca0e23adbe92c68fc9fc", 16, (Array:2), "1048 ** Column 'item_count' cannot be null [DB Error: unknown error]")
      #4 /home/dev17/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(NULL, 16, (Array:2), "1048 ** Column 'item_count' cannot be null [DB Error: unknown error]")
      #5 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/common.php(1904): PEAR->raiseError(NULL, NULL, NULL, NULL, "1048 ** Column 'item_count' cannot be null [DB Error: unknown error]", "DB_Error", TRUE)
      #6 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(928): DB_common->raiseError(-3, NULL, NULL, NULL, "1048 ** Column 'item_count' cannot be null")
      #7 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(402): DB_mysqli->mysqliRaiseError()
      #8 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
      #9 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
      #10 /home/dev17/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1055): DB_DataObject->query("INSERT INTO civicrm_batch (name , title , description , created_id , created...")
      #11 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(287): DB_DataObject->insert()
      #12 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Batch/BAO/Batch.php(72): CRM_Core_DAO->save()
      #13 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Financial/Form/FinancialBatch.php(244): CRM_Batch_BAO_Batch::create((Array:15), (Array:0), "financialBatch")
      #14 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(246): CRM_Financial_Form_FinancialBatch->postProcess()
      #15 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
      #16 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Financial_Form_FinancialBatch), "next", "Next")
      #17 /home/dev17/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Financial_Form_FinancialBatch), "next")
      #18 /home/dev17/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Financial_Form_FinancialBatch), "next")
      #19 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("next")
      #20 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(374): CRM_Core_Controller->run()
      #21 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Financial/Page/FinancialBatch.php(96): CRM_Core_Page_Basic->edit(1, NULL)
      #22 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(293): CRM_Financial_Page_FinancialBatch->run((Array:3), NULL)
      #23 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:13))
      #24 /home/dev17/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
      #25 /home/dev17/public_html/sites/all/modules/civicrm/drupal/civicrm.module(382): CRM_Core_Invoke::invoke((Array:3))
      #26 [internal function](): civicrm_invoke("financial", "batch")
      #27 /home/dev17/public_html/includes/menu.inc(348): call_user_func_array("civicrm_invoke", (Array:2))
      #28 /home/dev17/public_html/index.php(18): menu_execute_active_handler()
      #29

      {main}

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: