-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#3056 - Crash with search builder if civigrant not enabled and have admin rights #22714
Conversation
(Standard links)
|
Nice job with the test @demeritcowboy! |
Test failure from first run looks related.
Cool. In this case, I think we can just edit the PR header. (The current base-commit is a common ancestor.) |
f87c1bc
to
8fe36e2
Compare
@demeritcowboy still the same test failure as before |
Yes but the versioncheck test that's failing is pointing to maybe a larger issue with civigrant so want to sort that out first. See https://lab.civicrm.org/dev/core/-/issues/3057. It should have been failing for the last month, and should be also failing in master. I am perplexed. |
e1f0a28
to
855e35c
Compare
I don't know what's different about the test node that's making it think search builder is a custom search. When I put in some debugging, on my local the "selector name" below is just CRM_Contact_Selector. What makes it be "custom" here?
|
There is a spooky interaction between
And then running the new test by itself, it passes:
|
Specifically, the interaction arises with testOpeningForms(...Fulltext search...):
|
I believe the leak is in protected function tearDown(): void {
parent::tearDown();
CRM_Contact_Form_Search::$_selectorName = 'CRM_Contact_Selector';
} But surely that cleanup belongs somewhere else... |
Ahh nice. Thanks for tracking down the spooky action. So we've invented quantum entangled tests then. Will take a look - those FormTest ones were an earlier attempt and they do have some flaws so what I might do is convert them to Invoke, but will look at the fulltext one. |
7200e6d
to
d2b9d0a
Compare
Just seeing what this breaks now. |
d2b9d0a
to
5dcfb8e
Compare
Jenkins retest this please. I've clicked around and checked universe and I think this might be the way to handle |
The final patch seems fine to me and I note tests have passed now. so I think this should be ok to merge right @demeritcowboy ? |
I added the constructor part, but otherwise it's the same as earlier. So it's just if someone sees an issue with the added constructor, which just repeats the assignment from the property declaration a few lines up. |
Thanks all! |
Overview
https://lab.civicrm.org/dev/core/-/issues/3056
Search Builder, as in Search -> Search Builder (civicrm/contact/search/builder), crashes if CiviGrant not enabled and you are an admin or have access CiviGrant permission still.
Before
After
Ok
Technical Details
CiviGrant was moved to an extension in 5.47. Search builder still references it.
Comments
It looks like 5.47 hasn't branched yet so putting against master. I'll rebase if it branches first.