dev/core#3782 Remove rule that stops signing up for a membership if matched contact already has a cancelled on of that type #24159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
A client had intermittent reports from people not being able to sign-up (for a membership) and being redirected to
civicrm%2Fcontribute%2Ftransact
instead of to the payment processor (though it turns out the same thing happens whatever payment processor you use).After a lot of work troubleshooting and adding debug I finally tracked it down to the following error:
Your %1 membership was previously cancelled and can not be renewed online. Please contact the site administrator for assistance.
But that error was not being reported back to the client and I had to log the contents of
$this->_errors
inCRM_Core_Form::validate()
to find out what was going on.I don't really understand why #3531 ever got merged given that it seems no-one was in favour of restricting memberships in this way: https://issues.civicrm.org/jira/browse/CRM-14645
Proposal: Just remove the code. If anyone actually needs it they could easily add it via a validateForm hook.
Before
Cannot signup for a membership via contribution page if matched contact has a cancelled membership of that type.
After
Can signup for a membership via contribution page if matched contact has a cancelled membership of that type.
Technical Details
Comments