CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Fatal error encountered when saving new contribution
Pages: [1]

Author Topic: Fatal error encountered when saving new contribution  (Read 4694 times)

benmoreassynt

  • I post occasionally
  • **
  • Posts: 52
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Joomla 2.5.19/Wordpress 3.8
  • MySQL version: 5.5.35
  • PHP version: 5.3.10
Fatal error encountered when saving new contribution
April 22, 2013, 11:14:34 am
Hi I'm running into the following error, which I've been unable to find a workaround for.
Viewing my other posts will reveal I've had problems with upgrading a CiviCRM install for a number of months, however the evidence I can see suggests the database schema is correct, so I don't know what the cause of the issue might be. Appreciate thoughts as always.

Error received when saving a contribution.
Code: [Select]
NULL

backTrace

#0 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(307): CRM_Core_Error::backtrace()
#1 /webroot/administrator/components/com_civicrm/civicrm/CRM/Utils/Type.php(324): CRM_Core_Error::fatal("One of parameters  (value: ) is not of the type Integer")
#2 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(984): CRM_Utils_Type::validate(NULL, "Integer")
#3 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(908): CRM_Core_DAO::composeQuery("SELECT id,name,label,html_type,is_enter_qty,help_pre,help_post,weight,is_disp...", (Array:1), TRUE)
#4 /webroot/administrator/components/com_civicrm/civicrm/CRM/Price/BAO/Set.php(507): CRM_Core_DAO::executeQuery("SELECT id,name,label,html_type,is_enter_qty,help_pre,help_post,weight,is_disp...", (Array:1))
#5 /webroot/administrator/components/com_civicrm/civicrm/CRM/Contribute/Form/Contribution.php(1155): CRM_Price_BAO_Set::getSetDetail(NULL)
#6 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(246): CRM_Contribute_Form_Contribution->postProcess()
#7 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(151): CRM_Core_Form->mainProcess()
#8 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php(128): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution), "upload")
#9 /webroot/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), "upload")
#10 /webroot/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), "upload")
#11 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(310): HTML_QuickForm_Page->handle("upload")
#12 /webroot/administrator/components/com_civicrm/civicrm/CRM/Contribute/Page/Tab.php(296): CRM_Core_Controller->run()
#13 /webroot/administrator/components/com_civicrm/civicrm/CRM/Contribute/Page/Tab.php(353): CRM_Contribute_Page_Tab->edit()
#14 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(220): CRM_Contribute_Page_Tab->run((Array:3), NULL)
#15 /webroot/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(51): CRM_Core_Invoke::_invoke((Array:3))
#16 /webroot/administrator/components/com_civicrm/admin.civicrm.php(87): CRM_Core_Invoke::invoke((Array:3))
#17 /webroot/administrator/components/com_civicrm/admin.civicrm.php(40): civicrm_invoke()
#18 /webroot/libraries/joomla/application/component/helper.php(383): require_once("/webroot/administrator/components/com_civicrm/admin....")
#19 /webroot/libraries/joomla/application/component/helper.php(351): JComponentHelper::executeComponent("/webroot/administrator/components/com_civicrm/admin....")
#20 /webroot/administrator/includes/application.php(153): JComponentHelper::renderComponent("com_civicrm")
#21 /webroot/administrator/index.php(46): JAdministrator->dispatch()
#22 {main}
« Last Edit: April 22, 2013, 11:16:37 am by benmoreassynt »

DaveT

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: 5.5.28
  • PHP version: 5.3
Re: Fatal error encountered when saving new contribution
June 19, 2013, 12:02:59 pm
I am experiencing the same error.  If I use a price set it doesn't give the error but entering a new contribution without a price set gives me this exact error and the same backtrace statements.

backTrace

#0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(308): CRM_Core_Error::backtrace()
#1 /var/www/html/sites/all/modules/civicrm/CRM/Utils/Type.php(326): CRM_Core_Error::fatal("One of parameters  (value: ) is not of the type Integer")
#2 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(977): CRM_Utils_Type::validate(NULL, "Integer")
#3 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(903): CRM_Core_DAO::composeQuery("SELECT id,name,label,html_type,is_enter_qty,help_pre,help_post,weight,is_disp...", (Array:1), TRUE)

benmoreassynt

  • I post occasionally
  • **
  • Posts: 52
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Joomla 2.5.19/Wordpress 3.8
  • MySQL version: 5.5.35
  • PHP version: 5.3.10
Re: Fatal error encountered when saving new contribution
June 19, 2013, 12:09:57 pm
Hi DaveT,

As you'll have noticed, I did not get a reply to my initial inquiry, however I believe this problem ended up being a matter of missing data in a CiviCRM DB table. In other words, even if the schema is right, the error occurs if some default data is missing.

Take a look at this post: http://forum.civicrm.org/index.php?topic=26367.0, and try using the SQL posted by user Eileen. It worked for me
« Last Edit: June 19, 2013, 12:12:31 pm by benmoreassynt »

DaveT

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: 5.5.28
  • PHP version: 5.3
Re: Fatal error encountered when saving new contribution
June 19, 2013, 12:20:38 pm
Thanks - I will give that a try and report back

DaveT

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 1
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: 5.5.28
  • PHP version: 5.3
Re: Fatal error encountered when saving new contribution
June 19, 2013, 01:55:32 pm
That worked, here are the SQL insert statements I used - note that contribution_type_id is now financial_type_id

Thanks for watching this post and pointing me to the correct solution.

INSERT INTO `civicrm_price_set` (`id`, `domain_id`, `name`, `title`, `is_active`, `help_pre`, `help_post`, `javascript`, `extends`, `financial_type_id`, `is_quick_config`, `is_reserved`) VALUES (10, NULL, 'default_contribution_amount', 'Contribution Amount', 1, NULL, NULL, NULL, '2', NULL, 1, 1);
INSERT INTO `civicrm_price_set` (`id`, `domain_id`, `name`, `title`, `is_active`, `help_pre`, `help_post`, `javascript`, `extends`, `financial_type_id`, `is_quick_config`, `is_reserved`) VALUES (11, NULL, 'default_membership_type_amount', 'Membership Amount', 1, NULL, NULL, NULL, '3', 2, 1, 1);

INSERT INTO `civicrm_price_field` (`id`, `price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `help_pre`, `help_post`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `active_on`, `expire_on`, `javascript`, `visibility_id`) VALUES (22, 11, 'membership_amount', 'Membership Amount', 'Radio', 0, NULL, NULL, 1, 0, 1, 1, 0, NULL, NULL, NULL, 1);
INSERT INTO `civicrm_price_field` (`id`, `price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `help_pre`, `help_post`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `active_on`, `expire_on`, `javascript`, `visibility_id`) VALUES (21, 10, 'contribution_amount', 'Contribution Amount', 'Text', 0, NULL, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, 1);

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Fatal error encountered when saving new contribution

This forum was archived on 2017-11-26.