Skip to content
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

Fix lack of price set options for edit registration from search results #24671

Conversation

larssandergreen
Copy link
Contributor

@larssandergreen larssandergreen commented Oct 5, 2022

Overview

A regression was introduced in 5.33 in #19125 that prevents the display of selected price set options when editing a registration from search results (but not from the contact events tab). That PR forced the form to action ADD when the context was search. This didn't seem to be a problem for editing the registration in general (the action was still UPDATE for the main body of the form, but it was ADD for the price set template embedded in it, causing it to not display correctly). Not entirely clear to me why the action was different, but this fixes the problem by not changing the action if it is UPDATE.

image
Notice that the action at the top of the page is 2 in Participant.tpl, but then when Participant.tpl comes back for another round to show the fee block, the action has changed to 1 (not sure why or how Participant.tpl is called a second time inside itself).

Before

image

After

image

Technical Details

Can't say this looks good, but it works and this already stretched my understanding of contexts and actions so I'm not seeing a better solution (other than separating the forms of course).

@civibot
Copy link

civibot bot commented Oct 5, 2022

(Standard links)

@civibot civibot bot added the master label Oct 5, 2022
@civicrm-builder
Copy link

Can one of the admins verify this patch?

@demeritcowboy
Copy link
Contributor

jenkins retest this please

@demeritcowboy demeritcowboy merged commit e8e7708 into civicrm:master Apr 6, 2023
@larssandergreen
Copy link
Contributor Author

Thanks @demeritcowboy !

@larssandergreen larssandergreen deleted the fix-wrong-action-for-registration-edit-from-search-results branch May 24, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants