Hi, I just updated to the dev version (7.x-1.x-dev) to fix a problem with fast_404 not working with the D7 redirect module. Now (after the update) fast_404 does work with the redirect module but it does not work with drush.

On the command line I'm getting a 404 page returned for even just a "drush st" command.

Here is the output:

drush st
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "/index.php" was not found on this server.</p></body></html>Drush command terminated abnormally due to an unrecoverable error.                 

I don't see any notes or documentation on how to get drush working in the inc files anywhere.

Thanks for any help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dshumaker’s picture

Status: Active » Needs review

To get around the drush issue I just added a cli check in the settings.php that seemed to fix the problem for me.

if (php_sapi_name() != 'cli') {
  if (file_exists(__DIR__ . '/fast_404_settings.inc')) {
    require (__DIR__ . '/fast_404_settings.inc');
  }
}

So I guess this is a fixed bug but someone should probably document it. I'll let the maintainer close it.

loopduplicate’s picture

Thanks Dan! Perfect.

joelstein’s picture

Title: drush returning 404s. » Ignore drush calls
Issue summary: View changes
FileSize
418 bytes

Here's a patch which ignores drush calls in fast_404_ext_check(), instead of requiring users to update settings.php.

Dave Reid’s picture

Just checking drupal_is_cli() is necessary. This shouldn't rely on Drush necessarily but should be bypassed alltogether if being invoked via command line.

loopduplicate’s picture

Category: Support request » Bug report
FileSize
430 bytes

Uploading a new patch per Dave's recommendation.

adammalone’s picture

Status: Needs review » Needs work

This patch doesn't apply - was it created against the 7.x-1.x branch?

loopduplicate’s picture

Status: Needs work » Needs review
FileSize
536 bytes

Rerolling patch. This is definitely against the 7.x-1.x branch, not sure about the last one :)

loopduplicate’s picture

Removes whitespace.

adammalone’s picture

Status: Needs review » Closed (fixed)

.

adammalone’s picture

Thanks!