Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid SQL generated when adding a contribution to a gift aid batch #17

Open
sgladstone opened this issue Feb 3, 2015 · 0 comments
Open

Comments

@sgladstone
Copy link

When I attempt to add a contribution to a Gift Aid batch, I get the following SQL error:

Field 'status_id' doesn't have a default value

The stack trace:
#0 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(149): CRM_Core_Error::backtrace()
#1 internal function: CRM_Core_Error::handle(Object(DB_Error))
#2 /home/london/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/london/public_html/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
#4 /home/london/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
#5 /home/london/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "INSERT INTO civicrm_batch (name , title , description , created_id , created_...", "DB_Error", TRUE)
#6 /home/london/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-1, NULL, NULL, NULL, "1364 ** Field 'status_id' doesn't have a default value")
#7 /home/london/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/london/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
#9 /home/london/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2434): DB_common->query("INSERT INTO civicrm_batch (name , title , description , created_id , created_...")
#10 /home/london/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/london/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(278): DB_DataObject->insert()
#12 /home/london/public_html/sites/all/modules/civicrm/CRM/Batch/BAO/Batch.php(72): CRM_Core_DAO->save()
#13 /home/london/public_html/pogstone_extensions/uk.co.compucorp.civicrm.giftaid/CRM/Civigiftaid/Form/Task/AddToBatch.php(139): CRM_Batch_BAO_Batch::create((Array:6))
#14 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(261): CRM_Civigiftaid_Form_Task_AddToBatch->postProcess()
#15 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#16 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Civigiftaid_Form_Task_AddToBatch), "next", "Next")
#17 /home/london/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Civigiftaid_Form_Task_AddToBatch), "next")
#18 /home/london/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Civigiftaid_Form_Task_AddToBatch), "next")
#19 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(339): HTML_QuickForm_Page->handle("next")
#20 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(323): CRM_Core_Controller->run((Array:3), NULL)
#21 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:14))
#22 /home/london/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#23 /home/london/public_html/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
#24 internal function: civicrm_invoke("contribute", "search")
#25 /home/london/public_html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
#26 /home/london/public_html/index.php(21): menu_execute_active_handler()
#27 {main}

Other notes:
I am running CiviCRM 4.4.7 on MySQL version 5.6.22

artfulrobot pushed a commit to artfulrobot/uk.co.compucorp.civicrm.giftaid that referenced this issue May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant