Fatal error Incorrect datetime value: '0' for column 'transaction_date' when editing a participant record and recording payment with no received date
- Find a participant record that does not have payment recorded.
- Edit it.
- Minor problem: The payment section should be hidden until you click the record payment checkbox, but it suggests possibly something wrong with the javascript. Similar thing with send confirmation receipt.
- Also if you're editing one from the stock sample data you get the word "Total" hanging alone in midair above it, but this might be a separate issue with the sample data which maybe didn't get updated for some kind of change in what it's looking for here. Doesn't happen with newly created ones.
- Bigger problem: If you check the box and then fill out the amount (just the amount) and click save you get
Incorrect datetime value: '0' for column 'transaction_date' at row 1
.- You can get this on a brand new participant registration too if you manually blank out the default received date, but you probably wouldn't do that in real life. Just it's obviously pointing to some incorrect handling of blanks.
I'm marking it a regression since doesn't happen in 5.28. And interestingly the javascript for the send confirmation checkbox works in 5.28, although the record payment checkbox is the same as master.
0 .../CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
1 .../vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
2 .../vendor/pear/db/DB.php(998): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
3 .../vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
4 .../vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...", "DB_Error", TRUE)
5 .../vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
6 .../vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...", "1292 ** Incorrect datetime value: '0' for column 'transaction_date' at row 1")
7 .../vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
8 .../vendor/pear/db/DB/common.php(1234): DB_mysqli->simpleQuery("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
9 .../packages/DB/DataObject.php(2696): DB_common->query("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
10 .../packages/DB/DataObject.php(1245): DB_DataObject->_query("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
11 .../CRM/Core/DAO.php(638): DB_DataObject->insert()
12 .../CRM/Financial/BAO/FinancialItem.php(142): CRM_Core_DAO->save()
13 .../CRM/Contribute/BAO/Contribution.php(1137): CRM_Financial_BAO_FinancialItem::create((Array:9), NULL, (Array:1))
14 .../CRM/Contribute/BAO/Contribution.php(3765): CRM_Contribute_BAO_Contribution::createFinancialItemsForLine((Array:31), "changeFinancialType", (Array:1), (Array:1), (Array:30), FALSE, (Array:1), 8)
15 .../CRM/Contribute/BAO/Contribution.php(3595): CRM_Contribute_BAO_Contribution::updateFinancialAccounts((Array:31), "changeFinancialType")
16 .../CRM/Contribute/BAO/Contribution.php(215): CRM_Contribute_BAO_Contribution::recordFinancialAccounts((Array:31))
17 .../CRM/Contribute/BAO/Contribution.php(479): CRM_Contribute_BAO_Contribution::add((Array:31))
18 .../CRM/Event/Form/Participant.php(1330): CRM_Contribute_BAO_Contribution::create((Array:31))
19 .../CRM/Event/Form/Participant.php(944): CRM_Event_Form_Participant->submit((Array:29))
20 .../CRM/Core/Form.php(513): CRM_Event_Form_Participant->postProcess()
21 .../CRM/Core/QuickForm/Action/Upload.php(152): CRM_Core_Form->mainProcess()
22 .../CRM/Core/QuickForm/Action/Upload.php(119): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Event_Form_Participant), "upload")
23 .../packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Event_Form_Participant), "upload")
24 .../packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Participant), "upload")
25 .../CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("upload")
26 .../CRM/Event/Page/Tab.php(100): CRM_Core_Controller->run()
27 .../CRM/Event/Page/Tab.php(166): CRM_Event_Page_Tab->edit()
28 .../CRM/Core/Invoke.php(312): CRM_Event_Page_Tab->run((Array:4), NULL)
29 .../CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
30 .../CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
31 .../drupal/civicrm.module(459): CRM_Core_Invoke::invoke((Array:4))
32 .../includes/menu.inc(527): civicrm_invoke("contact", "view", "participant")
33 .../index.php(21): menu_execute_active_handler()
34 {main}