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!

CommentFileSizeAuthor
#3 securesite.module-1454468.patch563 byteskenorb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

Hi 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.

kenorb’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Postponed (maintainer needs more info) » Active

I'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.

kenorb’s picture

Status: Active » Needs review
FileSize
563 bytes
mgifford’s picture

That patch seems to apply nicely. I'm not sure how to use it though.

How do we test the functionality?