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

SearchKit - Fix crashy-ness when an Afform contains a deleted search #25091

Merged

Conversation

colemanw
Copy link
Member

Overview

Fixes crash when trying to load an Afform that contains a SavedSearch which has been deleted.

Before

Hard crash if a SavedSearch embedded in an Afform cannot be found. I tested this by embedding a Search in a form (using the default table display), then deleting it without deleting the form. Caused random system crashes even on non-afform pages.

After

No crash.

Technical Details

Lots of whitespace changes but the only functional difference is to add try/catch.

@civibot
Copy link

civibot bot commented Nov 30, 2022

(Standard links)

@civibot civibot bot added the master label Nov 30, 2022
@seamuslee001
Copy link
Contributor

Jenkins re test this please

@colemanw
Copy link
Member Author

colemanw commented Dec 1, 2022

Test failures are unrelated

@seamuslee001
Copy link
Contributor

when looking at this in ignore whitespace mode https://github.com/civicrm/civicrm-core/pull/25091/files?w=1 it makes it a lot more obvious what is going on here and seems fine to me

@seamuslee001 seamuslee001 merged commit dccfdbf into civicrm:master Dec 1, 2022
@colemanw colemanw deleted the fixCrashyAfformSearchMetadataInjector branch December 1, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants