This started happening to my site. Not sure why.

Comments

jaydee1818’s picture

Issue summary: View changes
Priority: Critical » Major

Example, if I click:

Advanced Help > "module title (eg. Better Exposed Filters)" > README

Results in:

Not Found

The requested URL "/help/better_exposed_filters/README.txt" was not found on this server.

sonicthoughts’s picture

same issue

gisle’s picture

Version: 7.x-1.0 » 7.x-1.1
Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Closed (cannot reproduce)

This original report is one year old and I am unable to reproduce on the latest supported release.

While there is a second report from two months ago, I am sure this is not a common problem, and it is impossible to pinpoint what causes this without more details. I am therefore downgrading to a "Support request" and closing.

Feel free to reopen if you can explain how to reproduce from a clean install.

jaydee1818’s picture

To replicate this problem, you can download and enable the Fast 404 module - https://www.drupal.org/project/fast_404

Then enabling Clean URL's.

jaydee1818’s picture

Status: Closed (cannot reproduce) » Active
gisle’s picture

Assigned: Unassigned » gisle
Status: Active » Fixed

Thanks for the update!
This happens because Fast 404 is incompatible with Advanced Help.

When looking at its code, I noticed that Fast 404 chooses to "blacklists" a number of file extensions, including txt.

This "blacklist is defined by the following line in fast_404.inc:

// Load up the blacklisted extensions.
$exts = variable_get('fast_404_exts', '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i');

I've no idea why it does such a thing. But it makes Fast 404 return 404 if you try to use Drupal to show any file that has any of the extensions listed, including README.txt

This "blacklist" looks pretty arbitrary to me. For instance the extension md is not blacklisted, so markdown text (standard name README.md) will not be blacklisted. (But I have not done any deep analysis of Fast 404 to discover the rationale behind this blacklist, so there may be some reason behind it.)

You can fix the problem by disabling Fast 404 (recommended), or by having the following line in your settings.php (make sure it all is on one line):

$conf['fast_404_exts'] = '/^(?!robots).*\.(png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';

The latter setting omits txt-files from the "blacklist". Use this at your own risk. I cannot guarantee that removing this extension from will not cause any harmful side effects or security implications.

gisle’s picture

Created related issue in the Fast 404 issue queue.

jaydee1818’s picture

Thanks - I applied your patch and I can now view Advanced Help without disabling Fast 404. There don't seem to be any noticeable issue but will keep you posted if anything crops up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.