3

Configuration: - Civi 5.21.2 - Wordpress

What am I trying to do : Create a contribution manualy trhough the back-office :http://localhost/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fadd&reset=1&action=add&context=standalone

here is my filled form: enter image description here

When submitting the form I get this error:

CRM_Core_Exception: One of parameters (value: ) is not of the type Integer in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php on line 1524

Exception trace:

#   Function    Location
0   CRM_Utils_Type::validate('', 'Integer') /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1524
1   CRM_Core_DAO::composeQuery('SELECT id,name,l…', Array, true)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1402
2   CRM_Core_DAO::executeQuery('SELECT id,name,l…', Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php:475
3   CRM_Price_BAO_PriceSet::getSetDetail(null)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:1371
4   CRM_Contribute_Form_Contribution->submit(Array, 1, null)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:944
5   CRM_Contribute_Form_Contribution->postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:479
6   CRM_Core_Form->mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153
7   CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120
8   CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
9   HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
10  HTML_QuickForm_Page->handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:335
11  CRM_Core_Controller->run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:316
12  CRM_Contribute_Page_Tab->edit() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:372
13  CRM_Contribute_Page_Tab->run(Array, null)   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:268
14  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:68
15  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
16  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1449
17  CiviCRM_For_WordPress->invoke('')   /var/www/html/wp-includes/class-wp-hook.php:288
18  WP_Hook->apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:312
19  WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:478
20  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:254
21  {main}

I'm sure this issue is due to some misconfiguration of some kind. Could someone help with that? What Am I missing.

I also have a 500 error when viewing an existing contribution.

Any help appreciated, we are stuck in this situation.

  • This sounds familiar and may be related to Financial Account translations. Administer > Contribute > Financial Accounts (comptes financiers). Can you check, for example, if "Accounts Receivable" exists? – bgm Feb 3 at 15:45
  • Hello @bgm It seems ok : ibb.co/5cHgxGd I saved each account again just to be sure... I don't get what civi expect from this line of code : $this->_priceSetId = $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', 'default_contribution_amount', 'id', 'name'); The priceset retruned is Null, and makes the code fails afterwards. – Naakf Feb 11 at 9:19
  • Can you try renaming "Comptes à recevoir" to "Accounts Receivable"? The getFieldValue() does the equivalent of select * from civicrm_price_set where name = 'default_contribution_amount' (I think) – bgm Feb 12 at 13:52
  • Ok, so I found out why (thx to bgm) The quick configs where not in db. I compared a "clean" new install and inserted the default price set. Resolved. Thanx @bgm – Naakf Feb 12 at 15:19
  • @bgm if you post an answer folks will upvote it :) – Jon G - Megaphone Tech Feb 12 at 18:01
3

According to the trace and to your comments, this SQL query can help find if there is data missing from the database:

SELECT * FROM civicrm_price_set WHERE name = 'default_contribution_amount'
|improve this answer|||||
0

Do have have any overridden / customised files?

I came across similar issues recently but was ultimately down to customisation.

Would suggest trying with core version of those files and see if it works correctly for you :).

|improve this answer|||||
  • Not on civicontribute :-( – Naakf Feb 11 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.