-
-
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
core#1132 - don't fire hook_civicrm_fieldOptions before hook_civicrm_… #19580
Conversation
(Standard links)
|
@seamuslee001 true. I wrote this mostly as a way to get some more knowledgeable eyes on the bug. If someone tells me this is the right general approach, I'll deal with test failures etc., but I'm not very confident this is the correct fix. |
I'm OK with not being able to modify the list of languages via fieldOptions(). I've also encountered something similar on some niche configurations (emailapi + multilingual + symbiotic's monitoring extension, which does I can't comment on the other technical issues around it, but it would definitely need a code comment to avoid regressions :) |
I'll consider @mlutfy's comments to be a preliminary "concept approved", so I'll fix the issues present in this patch. |
…config loads all files
4dc4579
to
8cab7b3
Compare
@mlutfy do you want to give this some light testing - it seems as agreed |
I ran into veda-consulting-company/uk.co.vedaconsulting.mosaico#427 and this patch fixed it! Thanks @MegaphoneJon |
I think this probably should have gotten merged into the RC if it's fixing hard crashes. Anyone object to changing the base for this PR to the RC branch? |
I'm happy with this going into the rc |
Now this is against the RC. |
…config loads all files
https://lab.civicrm.org/dev/core/-/issues/1132
Overview
hook_civicrm_config
is responsible for adding files to the autoloader.hook_civicrm_config
callshook_civicrm_fieldOptions
. As a result,hook_civicrm_fieldOptions
crashes if you reference a class that's not in core (i.e. in an extension).Before
Crashes.
After
No crashes.
Technical Details
The backtrace is on https://lab.civicrm.org/dev/core/-/issues/1132, which explains why this happens.
Comments
This will hopefully fix the conflict that Mosaico 2.6 has with other extensions (like Areas).
Steps to replicate
hook_civicrm_fieldOptions
, call this method.At this point, most of CiviCRM will be broken. Clearing cache will certainly trigger the bug.