Hi! After enabling Fast 404, every autocompletition field stopped working.

When you type on an autocompletition field (like CCK or taxonomy term), an error is returned:

An HTTP error 404 occurred.
http://www.domain.com/taxonomy/autocomplete/2

Would be possible to disable fast 404 on editing forms or for internal URLs like this?

Comments

soyarma’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using path checking and/or whitelisting?

finex’s picture

Hi! This is the configuration I've used:

# Load the fast_404.inc file. This is needed if you wish to do extension checking in settings.php
include_once('./sites/all/modules/fast_404/fast_404.inc');

# Disallowed extensions. Any extension in here will not be served by Drupal and will get a fast 404
# Default extension list, this is considered safe and is even in queue for Drupal 8 (see: http://drupal.org/node/76824)
# $conf['fast_404_exts'] = '/\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
$conf['fast_404_exts'] = '/\.(txt|png|gif|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';

# Allow anonymous users to hit URLs containing 'imagecache' even if the file does not exist.
# TRUE is default behavior. If you know all imagecache variations are already made
# set this to FALSE.
$conf['fast_404_allow_anon_imagecache'] = TRUE;

# Extension list requiring whitelisting to be activated **If you use this without whitelisting enabled your site will not load!
//$conf['fast_404_exts'] = '/\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp|php|html?|xml)$/i';

# Default fast 404 error message.
$conf['fast_404_html'] = '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><style media="screen" type="text/css">
#goog-wm ul li{display:none}
#goog-wm ul li.search-goog{display:block}
</style><body><h1>404 Pagina non trovata</h1><p>La pagina richiesta non esiste.</p><script type="text/javascript">
  var GOOG_FIXURL_LANG = \'it\';
  var GOOG_FIXURL_SITE = \'http://www.domain.com\'
</script>
<script type="text/javascript"
  src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
</script></body></html>';

# Check paths during bootstrap and see if they are legitimate
$conf['fast_404_path_check'] = TRUE;

# If enabled, you may add extensions such as xml and php to the $conf['fast_404_exts'] above.
# BE CAREFUL with this setting as some modules use their own php files and you need to be certain
# they do not bootstrap Drupal. If they do, you will need to whitelist them too.
$conf['fast_404_url_whitelisting'] = FALSE;

# Array of whitelisted files/urls. Used if whitelisting is set to TRUE
$conf['fast_404_whitelist'] = array('index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php');

# Call the extension checking now. This will skip any logging of 404s.
# Extension checking is safe to do from settings.php. There are many examples of this on Drupal.org.
//fast_404_ext_check();

# Path checking. USE AT YOUR OWN RISK (only works with MySQL)
# Path checking at this phase is more dangerous, but faster. Normally Fast_404 will check paths during Drupal
# boostrap via hook_boot. Checking paths here is faster, but trickier as the Drupal database connections have not
# yet been made and the module must make a separate DB connection. Under most configurations this DB connection will be
# reused by Drupal so there is no waste.
# While this setting finds 404s faster, it adds a bit more load time to regular pages, so only use
# if you are spending too much CPU/Memory/DB on 404s and the trade-off is worth it.
# This setting will deliver 404s with less than 2MB of RAM.
//fast_404_path_check();

soyarma’s picture

Status: Postponed (maintainer needs more info) » Needs review

I believe I've corrected this. A patch I accepted awhile back to make path checking faster also broke some paths :S

You can check out the 6.x-1.x branch from git, or wait for drupal to rebuild the dev zip/tar.gz today to try it out.

soyarma’s picture

Status: Needs review » Closed (fixed)
ragnarkurm’s picture

Issue summary: View changes

See https://www.drupal.org/project/fast_404/issues/3007096
There is working patch for 7.x, it is not just one url, it is a set of mismatched urls.