Answers.Body: <p>Just to close the loop on this question, this was answered in another post</p>
  <p><a href="https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25" rel="nofollow noreferrer">https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-25T09:57:25.567Z
Answers.LastActivityDate: 2020-08-25T09:57:25.567Z
Answers.UserDisplayName: Clement Leong
Body: <p>CiviCRM 4.7.29 on Wordpress 4.9.8 on Ubuntu</p>
  
  <p>Hello all,</p>
  
  <p>We had the above instance running well and doing batch validation under CiviContribution well but had recently choked on validation with the following error:</p>
  
  <p>** text version of the error at the end of this post
  <a href="https://i.sstatic.net/Q3Efn.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Q3Efn.png" alt="batch validation error"></a></p>
  
  <p>The changes that seem to have taken place before this is the installation of 2 extensions:</p>
  
  <p>Edit Line Item Extension v2.0
  (biz.jmaconsulting.lineitemedit)</p>
  
  <p>ExtendedReport  v3.0
  (nz.co.fuzion.extendedreport)</p>
  
  <p>Would anyone be able to advise how we can regain the batch validation function.  We have uninstalled the above 2 extensions but the problem still persists.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Clement</p>
  
  <p>====
  I later observed Price Set Errors that seems to be related to the same issue:</p>
  
  <p>I also noticed other errors related to Line Item Report which could be related to the same issue: </p>
  
  <p>Invalid Price Fields                           Hide
  the following Price Set Fields use disabled or invalid financial types and need to be fixed if they are to still be used.</p>
  
  <p>Price Set           Price Set Field         Action Link
  Contribution Amount Contribution Amount     View Price Set Fields
  Contribution Amount Additional Line Item 1  View Price Set Fields
  Contribution Amount Additional Line Item 2  View Price Set Fields
  Contribution Amount Additional Line Item 3  View Price Set Fields
  Contribution Amount Additional Line Item 4  View Price Set Fields
  Contribution Amount Additional Line Item 5  View Price Set Fields
  Contribution Amount Additional Line Item 6  View Price Set Fields
  Contribution Amount Additional Line Item 7  View Price Set Fields
  Contribution Amount Additional Line Item 8  View Price Set Fields
  Contribution Amount Additional Line Item 9  View Price Set Fields
  Contribution Amount Additional Line Item 10 View Price Set Fields
  Membership Amount   Membership Amount   View Price Set Fields</p>
  
  <p>=================</p>
  
  <p>Text of error message</p>
  
  <pre><code>CRM_Core_Exception: expected only one price field to be in price set but multiple are present in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php on line 453
  Exception trace
  #   Function    Location
  0   CRM_Price_BAO_PriceSet::getOnlyPriceFieldID(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:453
  1   CRM_Batch_Form_Entry-&gt;processContribution(Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:418
  2   CRM_Batch_Form_Entry-&gt;postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:447
  3   CRM_Core_Form-&gt;mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:169
  4   CRM_Core_QuickForm_Action_Upload-&gt;realPerform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:136
  5   CRM_Core_QuickForm_Action_Upload-&gt;perform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
  6   HTML_QuickForm_Controller-&gt;handle(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
  7   HTML_QuickForm_Page-&gt;handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:351
  8   CRM_Core_Controller-&gt;run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:113
  9   CRM_Utils_Wrapper-&gt;run('CRM_Batch_Form_E…', null, Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:282
  10  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:84
  11  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
  12  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1218
  13  CiviCRM_For_WordPress-&gt;invoke('')   /var/www/html/wp-includes/class-wp-hook.php:286
  14  WP_Hook-&gt;apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:310
  15  WP_Hook-&gt;do_action(Array)   /var/www/html/wp-includes/plugin.php:453
  16  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:224
  17  {main}   
  
   Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  expected only one price field to be in price set but multiple are present
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-20T11:33:21.913Z
Comments.Text: Not sure what is causing that, but once you get past this issue you should plan to upgrade.  There are a lot of fixes since 4.7.29 including serious security issues.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-20T18:43:00.180Z
Comments.Text: Could you please edit your question to include the text in the screenshot?  It will make it easier both for people to help you and for others with a similar problem to find this in the future.  Also, please let us know the version of the extensions?  Particularly Line Item Edit, which may be a culprit here.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-22T09:58:43.860Z
Comments.Text: Just to update that this was resolved by the plugin author.  More details at https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25
Comments.UserDisplayName: Clement Leong
Tags: <civicontribute><batches><validation>
Title: Broken Batch Validation
ThreadText: # Broken Batch Validation
  
  (Asked by: username_0 on 2018-11-20)
  
  CiviCRM 4.7.29 on Wordpress 4.9.8 on Ubuntu
  Hello all,
  We had the above instance running well and doing batch validation under CiviContribution well but had recently choked on validation with the following error:
  ** text version of the error at the end of this post
  
  The changes that seem to have taken place before this is the installation of 2 extensions:
  Edit Line Item Extension v2.0
  (biz.jmaconsulting.lineitemedit)
  ExtendedReport  v3.0
  (nz.co.fuzion.extendedreport)
  Would anyone be able to advise how we can regain the batch validation function.  We have uninstalled the above 2 extensions but the problem still persists.
  Thanks in advance!
  Clement
  ====
  I later observed Price Set Errors that seems to be related to the same issue:
  I also noticed other errors related to Line Item Report which could be related to the same issue: 
  Invalid Price Fields                           Hide
  the following Price Set Fields use disabled or invalid financial types and need to be fixed if they are to still be used.
  Price Set           Price Set Field         Action Link
  Contribution Amount Contribution Amount     View Price Set Fields
  Contribution Amount Additional Line Item 1  View Price Set Fields
  Contribution Amount Additional Line Item 2  View Price Set Fields
  Contribution Amount Additional Line Item 3  View Price Set Fields
  Contribution Amount Additional Line Item 4  View Price Set Fields
  Contribution Amount Additional Line Item 5  View Price Set Fields
  Contribution Amount Additional Line Item 6  View Price Set Fields
  Contribution Amount Additional Line Item 7  View Price Set Fields
  Contribution Amount Additional Line Item 8  View Price Set Fields
  Contribution Amount Additional Line Item 9  View Price Set Fields
  Contribution Amount Additional Line Item 10 View Price Set Fields
  Membership Amount   Membership Amount   View Price Set Fields
  =================
  Text of error message
  CRM_Core_Exception: expected only one price field to be in price set but multiple are present in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php on line 453
  Exception trace
  #   Function    Location
  0   CRM_Price_BAO_PriceSet::getOnlyPriceFieldID(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:453
  1   CRM_Batch_Form_Entry->processContribution(Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:418
  2   CRM_Batch_Form_Entry->postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:447
  3   CRM_Core_Form->mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:169
  4   CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:136
  5   CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
  6   HTML_QuickForm_Controller->handle(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
  7   HTML_QuickForm_Page->handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:351
  8   CRM_Core_Controller->run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:113
  9   CRM_Utils_Wrapper->run('CRM_Batch_Form_E…', null, Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:282
  10  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:84
  11  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
  12  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1218
  13  CiviCRM_For_WordPress->invoke('')   /var/www/html/wp-includes/class-wp-hook.php:286
  14  WP_Hook->apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:310
  15  WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:453
  16  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:224
  17  {main}   
  
   Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  expected only one price field to be in price set but multiple are present
  
  **Tags:** civicontribute, batches, validation
  
  > **Comments:**
  > **username_1**: Not sure what is causing that, but once you get past this issue you should plan to upgrade.  There are a lot of fixes since 4.7.29 including serious security issues.  
  > **username_2**: Could you please edit your question to include the text in the screenshot?  It will make it easier both for people to help you and for others with a similar problem to find this in the future.  Also, please let us know the version of the extensions?  Particularly Line Item Edit, which may be a culprit here.  
  > **username_0**: Just to update that this was resolved by the plugin author.  More details at https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-08-25. Score: 1 | Accepted answer
  
  Just to close the loop on this question, this was answered in another post
  
  <https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25>
  
  
  ---
  
  