Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Fatal error when attempting to update membership line items. #19

Closed
agileware-fj opened this issue Jun 1, 2018 · 3 comments
Closed

Comments

@agileware-fj
Copy link
Contributor

agileware-fj commented Jun 1, 2018

Steps to reproduce:

  1. Renew a membership, recording a contribution.
  2. Edit the contribution, open line item in edit
  3. Change the line item quantity.
  4. Save the line item.

Results:

"A fatal error was triggered"

Expected outcome:

Contribution is updated with higher quantity in line item, and probably the number of terms that the membership renewal is for is changed to match (ideal behaviour)


This appears to be a result of the edit trying to update or create a participant record when there is no participant or event.

Backtrace:

#1 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1130): CRM_Core_Error::fatal()
#2 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php(317): CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", NULL, "title")
#3 /home/all-stars-47/public_html/sites/all/modules/civicrm/api/v3/Participant.php(56): CRM_Event_BAO_Participant::create((Array:6))
#4 /home/all-stars-47/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_participant_create((Array:4))
#5 /home/all-stars-47/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#6 /home/all-stars-47/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7))
#7 /home/all-stars-47/public_html/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("Participant", "create", (Array:4))
#8 /home/all-stars-47/public_html/CRM/extensions/biz.jmaconsulting.lineitemedit/CRM/Lineitemedit/Form/Edit.php(248): civicrm_api3("Participant", "create", (Array:3))
#9 /home/all-stars-47/public_html/CRM/extensions/biz.jmaconsulting.lineitemedit/CRM/Lineitemedit/Form/Edit.php(199): CRM_Lineitemedit_Form_Edit->updateEntityRecord((Array:15))
#10 /home/all-stars-47/public_html/CRM/extensions/biz.jmaconsulting.lineitemedit/CRM/Lineitemedit/Form/Edit.php(152): CRM_Lineitemedit_Form_Edit->submit((Array:10))
#11 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(447): CRM_Lineitemedit_Form_Edit->postProcess()
#12 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Submit.php(74): CRM_Core_Form->mainProcess()
#13 /home/all-stars-47/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit->perform(Object(CRM_Lineitemedit_Form_Edit), "submit")
#14 /home/all-stars-47/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Lineitemedit_Form_Edit), "submit")
#15 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("submit")
#16 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#17 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(283): CRM_Utils_Wrapper->run("CRM_Lineitemedit_Form_Edit", "Edit Item", NULL)
#18 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#19 /home/all-stars-47/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#20 /home/all-stars-47/public_html/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3))
#21 [internal function](): civicrm_invoke("lineitem", "edit")
#22 /home/all-stars-47/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#23 /home/all-stars-47/public_html/index.php(21): menu_execute_active_handler()
#24 {main}```
@monishdeb
Copy link
Member

@agileware-fj great catch. Will you be able to create PR for this issue?

@agileware-fj
Copy link
Contributor Author

@monishdeb Forgot I had this bug in here, but this is addressed in #24

@monishdeb
Copy link
Member

#24 is merged now. Closing this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants