Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I would like to not execute securesite_boot hook when I executing site from drush.
I think about something like I explain with this mini-patch:
function securesite_boot() {
+ // Drush integration. Does nothing more when we are running from the
+ // cli.
+ if (function_exists('drush_verify_cli') && drush_verify_cli()) {
+ return;
+ }
+
How do you think about this?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#3 | securesite.module-1454468.patch | 563 bytes | kenorb |
Comments
Comment #1
Deciphered CreditAttribution: Deciphered commentedHi daniels,
I'm curious if there is any reason to do this, can you provide me some sound reasoning or a case where Secure Site is causing a Drush command not to work correctly? If so, I'd be happy to at least look at implementing it in the D7 version.
Cheers,
Deciphered.
Comment #2
kenorb CreditAttribution: kenorb commentedI've similar request.
Basically when clearing cache using drush, the weird things are happening. Especially around module_implements caching.
I think somehow module_implements is cached too early or in some bad way, so i.e. other new module hooks are ignored (e.g. search_api_solr).
I did: 'drush cc all' several times and it didn't help.
Only when clearing cache from UI helped. Backtrace from drush shows that module_implements is called by securesite.module's drupal_bootstrap.
I think this could be related that drush is already running drupal bootstrap separately, so there is no need to run it again from hook_boot().
Hopefully somebody could confirm that.
Comment #3
kenorb CreditAttribution: kenorb commentedComment #4
mgiffordThat patch seems to apply nicely. I'm not sure how to use it though.
How do we test the functionality?