-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-19594 Wrong Membership Updated #9349
Conversation
@eileenmcnaughton Do you think you can lend any support to the theory that this code is not needed? I think I have proven it to be harmful, but I don't know if simply removing it is an acceptable solution. |
Also it causes three related unit tests to fail https://test.civicrm.org/job/CiviCRM-Core-PR/12492/ |
I'm not seeing yet how to make this code smarter. I think calling code needs to be updated to not rely on this default. I did find that this function is called twice but I couldn't see how to change that execution pattern. |
From your JIRA comment "HOWEVER, when the LineItem BAO is invoked the first time, the entity_id is that of the contribution" In other words entity_id is being (incorrectly) conflated with contribution id. The issue is presumably that because the calling function is not setting entity_id to be the membership id it is incorrectly being set to be the contribution id here
Is this happening in multiple form flows? |
Whoops, I missed any notification of a reply... Given that a call that handles the membership does eventually get made, I'm not convinced that setting the correct entity_id is correct. Perhaps it is necessary to call this twice, once for the contribution and once for the membership? I feel out of my depth on this point. I was hoping you would know more about why, if not how, this gets invoked twice. I think a membership contribution page using price sets is the only form flow that can get us in this situation. |
@ginkgomzd I managed to replicate in a test - see #9390 - however I think we really need more tests to check what happens if there is a complex price set with contribution AND membership rows |
Closing in favour of #9390 |
remove bad assumption of what entity table should be.