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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Cannot Edit some Contributions After 4.2 Upgrade
Pages: [1]

Author Topic: Cannot Edit some Contributions After 4.2 Upgrade  (Read 723 times)

ldugger

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • LAANE
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.8
  • MySQL version: 5.1.69
  • PHP version: 5.3.16
Cannot Edit some Contributions After 4.2 Upgrade
September 07, 2012, 03:44:31 pm
Hi,

I recently upgraded from 4.0 to 4.2  8). It works great, however, When I edit SOME contribution records and hit Save, I receive an error that produces the following backtrace.

----------------------------------------------------------

Notice: Undefined index: price_field_id in Drupal/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php on line 1175

backTrace
Drupal/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 293
Drupal/sites/all/modules/civicrm/CRM/Core/DAO.php, fatal, 721
Drupal/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php, getFieldValue, 1175
Drupal/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 246
Drupal/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php, mainProcess, 151
Drupal/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php, realPerform, 128
Drupal/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
Drupal/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
public_html/Drupal/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 289
public_html/Drupal/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php, run, 296
Drupal/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php, edit, 353
Drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 228
Drupal/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 500
, civicrm_invoke,
Drupal/includes/menu.inc, call_user_func_array, 503
Drupal/index.php, menu_execute_active_handler, 21

----------------------------------------------------------------------------
Any ideas?  ???

NOTE: If this matters, I also upgraded PHP 5.2 to 5.3 and MySQL 5.0 to 5.1
« Last Edit: September 14, 2012, 02:18:57 pm by ldugger »

ldugger

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • LAANE
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.8
  • MySQL version: 5.1.69
  • PHP version: 5.3.16
Re: Cannot Edit some Contributions After 4.2 Upgrade
September 10, 2012, 01:31:55 pm
Seems like it has something to do with line items and price sets.  I found two articles talking about it, but am having trouble figuring out how to proceed.  One of the articles hints at it being fixed, but it obviously is not.
« Last Edit: September 14, 2012, 02:18:32 pm by ldugger »

ldugger

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • LAANE
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.8
  • MySQL version: 5.1.69
  • PHP version: 5.3.16
Re: Cannot Edit some Contributions After 4.2 Upgrade
September 13, 2012, 12:58:53 pm
This post is in Issue Tracker:  http://issues.civicrm.org/jira/browse/CRM-10812

UPDATE:  I upgraded to version 4.2.1 and still get the same thing.  All new contributions work fine.  I do notice on some contribution forms, the field price sets is missing and those are the contributions that get errors.   ???

     // 10117 update th line items for participants
     $this->_priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Field', $lineItems[$itemId]['price_field_id'], 'price_set_id');
      $lineItem[$this->_priceSetId] = $lineItems;
    }

    $isQuickConfig = 0;
    if ($this->_priceSetId &&  CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $this->_priceSetId, 'is_quick_config')) {
      $isQuickConfig = 1;
    }

    if (!CRM_Utils_Array::value('total_amount', $submittedValues)) {
      $submittedValues['total_amount'] = CRM_Utils_Array::value('total_amount', $this->_values);
    }
    $this->assign('lineItem', !empty($lineItem) && !$isQuickConfig ? $lineItem : FALSE);

    if (CRM_Utils_Array::value('soft_credit_to', $submittedValues)) {
      $submittedValues['soft_credit_to'] = $submittedValues['soft_contact_id'];
« Last Edit: September 14, 2012, 02:19:50 pm by ldugger »

ldugger

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • LAANE
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.8
  • MySQL version: 5.1.69
  • PHP version: 5.3.16
Re: Cannot Edit some Contributions After 4.2 Upgrade
September 14, 2012, 02:16:50 pm
UPDATE: looks like this is the issue .. http://issues.civicrm.org/jira/browse/CRM-10817#comment-45026

The error seems to reference the price set field on the contribution form. The field does not appear when pulling up certain contributions.  The contributions that appear to not be working are some Event Fees and Member Dues (usually with source as offline registration).  Unrestricted Donations do not seem to be affected.

Various contributions appear to have a different form layout.  The ones that work have the price set field visible.  The ones that cause an error have no price set field.

I attached a couple of screenshots showing the difference in working and non working forms.

« Last Edit: September 14, 2012, 02:21:37 pm by ldugger »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Cannot Edit some Contributions After 4.2 Upgrade

This forum was archived on 2017-11-26.