-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
[REF] Deplace usage of drupal_set_message with equivalent AddMessage … #45
[REF] Deplace usage of drupal_set_message with equivalent AddMessage … #45
Conversation
Maybe a silly question but how do you even trigger this code? I was thinking maybe through drush but when I try that I get the canary message instead. In any case I see two things code-wise:
|
Possibly but i would have thought it was a green message before because there is no 2nd param on the drupal_set_message |
Yeah this isn't an error or warning, it's an info/success message. Ideal colour probably blue :-) |
Looks like |
It does look like this is unfinished. Other than a nice message there's absolutely no consequence - we still proceed to trying to install even though we've just shown a message that indicates things are installed. Missing a |
@demeritcowboy @seamuslee001 @totten this is what it looked like pre-conversion to civicrm-setup. |
I'm going to take another run at this tomorrow. The deprecation is clear, so if I come up empty maybe we could merge and move to a lab ticket for talks about how you even get here and what should happen. |
Ok the way to reach these lines is by using the UI or The problem with just adding a return after the message is that drupal then still thinks it got installed fine, and civi proceeds to do a first run and finds the canary and throws an exception, and you never see the message anyway. So I'd say change this to throw an exception, which then makes it clearer what has actually happened, and seems better for programmatic use or command line like drush. (And remove the second sentence "Skipping full installation.") Then in future we should consider doing something with hook_uninstall and somehow avoiding even getting here because either way with an exception or message the drupal UI is left in an unusable state and the only way to get it back is by uninstalling civi with drush. |
Added https://lab.civicrm.org/dev/drupal/-/issues/141 for the hook_uninstall. |
@MikeyMJCO Do you have any opinion based on the above? I would probably lean towards a red error myself but maybe an exception might be appropriate maybe? |
What I'm saying though is that you never see that error, because even with or without adding a |
Closing in favour of #53 |
…function call
@KarinG @MikeyMJCO