When Ubercart SSL is activated and configured, Drush becomes broken and cannot do anything except spit out this:

Drush command terminated abnormally due to an unrecoverable error.   

According to moshe weitzman in this thread:

Sounds like misbehaving modules that assume all requests come via the web

CommentFileSizeAuthor
#12 1330668-uc_ssl-12.patch697 bytesrickmanelius
#5 uc_ssl.patch453 bytesseanr

Comments

stockliasteroid’s picture

Duplicated here as well. uc_ssl needs to check on the source of the request before issuing the redirect, as this breaks the Drupal bootstrap.

I'm not sure right now what the appropriate way is to check for this, but I'll look into it.

seanr’s picture

jason ruyle’s picture

Anyone have a fix for this? I'm getting this error as well.

Shai’s picture

Ahh, don't make me choose between uc_ssl and drush. I need them both.

Reporting same error.

seanr’s picture

Status: Active » Needs review
StatusFileSize
new453 bytes

The attached patch should do the trick.

Shai’s picture

@searnr,

I can't believe your timing. I need uc_ssl tonight! Thank YOU!

I'll report back to this thread how I make out with the patch.

Shai

Shai’s picture

I tested the patch in #5 and it works great. Running Drupal 7.14 and uc_ssl 7.x-1.01 I installed the module and confirmed getting the errors when using drush. (Drush status won't get you errors, you have to do something with drush). After applying the patch, Drush (v. 4.5 is what I'm running), works fine.

Thanks much,

Shai

koppie’s picture

Status: Needs review » Reviewed & tested by the community

Patch works for me too. When are we gonna see this in a stable release?

Thanks!!!

Baroch Oren’s picture

Issue tags: +adopting D7 usability to D6

just adding that this break is in 6.x as well, and applying the patch itself was not enough. I had to add the drupal_is_cli() function, to make it work. My preference is to put it in bootstrap.inc, but that would be bad in case of upgrade. Probably it can be just added to uc_ssl.module (as a patch).

function drupal_is_cli() {
  return ((!isset($_SERVER['SERVER_SOFTWARE']) || $_SERVER['SERVER_SOFTWARE'] == 'PHP CLI')
    && (php_sapi_name() == 'cli' || (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0)));
}
crystaldawn’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Drush was not supported previously. This patch fixes that and is now rolled into the releases.

Sborsody’s picture

Version: 7.x-1.01 » 6.x-1.26
Status: Closed (fixed) » Needs work

Needs backporting to 6.x-1.26. See https://drupal.org/node/1230132

The drupal_is_cli function is not available in Drupal 6.

rickmanelius’s picture

Status: Needs work » Needs review
StatusFileSize
new697 bytes

Combining #5 and #8 for D6.

crystaldawn’s picture

Status: Needs review » Closed (fixed)

Backported in 6.x-1.28+