Answers.Body: <p>Do have have any overridden / customised files? </p>
  
  <p>I came across similar issues recently but was ultimately down to customisation.</p>
  
  <p>Would suggest trying with core version of those files and see if it works correctly for you :).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-11T09:19:53.533Z
Answers.Text: Not on civicontribute :-(
Answers.UserDisplayName: Naakf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-30T15:21:37.313Z
Answers.LastActivityDate: 2020-01-30T15:21:37.313Z
Answers.UserDisplayName: EagleUK
Answers.Body: <p>According to the trace and to your comments, this SQL query can help find if there is data missing from the database:</p>
  
  <pre><code>SELECT * FROM civicrm_price_set WHERE name = 'default_contribution_amount'
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-12T18:30:08.033Z
Answers.LastActivityDate: 2020-02-12T18:30:08.033Z
Answers.UserDisplayName: bgm
Body: <p>Configuration:
  - Civi 5.21.2
  - Wordpress</p>
  
  <p>What am I trying to do : Create a contribution manualy trhough the back-office :<a href="http://localhost/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fcontribute%2Fadd&amp;reset=1&amp;action=add&amp;context=standalone" rel="nofollow noreferrer">http://localhost/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fcontribute%2Fadd&amp;reset=1&amp;action=add&amp;context=standalone</a></p>
  
  <p>here is my filled form:
  <a href="https://i.sstatic.net/lb5Ow.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lb5Ow.png" alt="enter image description here"></a></p>
  
  <p>When submitting the form I get this error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Exception trace:</p>
  
  <pre><code>#   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-&gt;submit(Array, 1, null)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:944
  5   CRM_Contribute_Form_Contribution-&gt;postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:479
  6   CRM_Core_Form-&gt;mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153
  7   CRM_Core_QuickForm_Action_Upload-&gt;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-&gt;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-&gt;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-&gt;handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:335
  11  CRM_Core_Controller-&gt;run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:316
  12  CRM_Contribute_Page_Tab-&gt;edit() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:372
  13  CRM_Contribute_Page_Tab-&gt;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-&gt;invoke('')   /var/www/html/wp-includes/class-wp-hook.php:288
  18  WP_Hook-&gt;apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:312
  19  WP_Hook-&gt;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}
  </code></pre>
  
  <p>I'm sure this issue is due to some misconfiguration of some kind.
  Could someone help with that?
  What Am I missing.</p>
  
  <p>I also have a 500 error when viewing an existing contribution.</p>
  
  <p>Any help appreciated, we are stuck in this situation.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-03T15:45:10.077Z
Comments.Text: 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?
Comments.UserDisplayName: bgm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-11T09:19:24.620Z
Comments.Text: Hello @bgm
  
  It seems ok : https://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.
Comments.UserDisplayName: Naakf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-12T13:52:30.713Z
Comments.Text: 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)
Comments.UserDisplayName: bgm
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-12T15:19:40.573Z
Comments.Text: 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
Comments.UserDisplayName: Naakf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-12T18:01:44.097Z
Comments.Text: @bgm if you post an answer folks will upvote it :)
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <wordpress><civicontribute>
Title: Unable to create a contribution from back-office (Civi 5.21.2)
ThreadText: # Unable to create a contribution from back-office (Civi 5.21.2)
  
  (Asked by: username_0 on 2020-01-30)
  
  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:
  
  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.
  
  **Tags:** wordpress, civicontribute
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_0**: Hello @username_1  It seems ok : https://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.  
  > **username_1**: 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)  
  > **username_0**: Ok, so I found out why (thx to username_1)  The quick configs where not in db. I compared a "clean" new install and inserted the default price set.  Resolved. Thanx @username_1  
  > **username_2**: @username_1 if you post an answer folks will upvote it :)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-02-12. Score: 3 | Accepted answer
  
  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'
  
  
  ---
  
  ### Answer by username_3 on 2020-01-30. Score: 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 :).
  
  > **Comments:**
  > **username_0**: Not on civicontribute :-(  
  
  ---
  
  