Fast404 path checking is incompatible with Redirect module

Created on 21 December 2016, almost 8 years ago
Updated 31 May 2023, over 1 year ago

Issue

When the redirect module is enabled, and fast404 path checking is also enabled, fast404 will fail paths that are configured as redirect sources.
Based on 7.x functionality, fast404 should not fail paths that are configured as source paths in the redirect module.

Steps to Reproduce

  1. Install Drupal 9.4
  2. composer require drupal/fast_404 drupal/redirect
  3. Enable redirect and fast404 modules
  4. Copy web/modules/contrib/fast_404/example.settings.fast404.php file into web/sites/default folder
  5. Rename the file as settings.fast404.php
  6. Uncomment
    $settings['fast404_path_check'] = TRUE;
    in settings.fast404.php to enable path checking.
  7. Add
    if (file_exists($app_root . '/' . $site_path . '/settings.fast404.php')) {
      include $app_root . '/' . $site_path . '/settings.fast404.php';
    }

    at the end of settings.php to allow fast404 module to take effect.

  8. Create a basic page, name its alias as /about-us
  9. Edit the same page, rename its alias as /about-you
  10. An redirect entity should automatically generate when new alias is saved on the same node. Check /admin/config/search/redirect to confirm.

What to expect

Without the patch

Navigating to /about-us will not redirect but go into fast404 page.

With the patch

Navigating to /about-us shall redirect normally to /about-you.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States paulmckibben Atlanta, GA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024