Sub-pathauto + Fast 404 causes page not found

Created on 15 April 2015, over 9 years ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

Sub-pathauto makes URLs work which are only partly covered by a URL alias. Fast 404 checks if a URL matches an existing route or alias and causes a 404 response if the requested URL does not match. For example node/123 with alias /foo/bar. With sub-pathauto the URL /foo/bar/baz will show the display of the node/123. But with both sub-pathauto and Fast 404 installed, the URL /foo/bar/baz will return a 'page not found'. This is because Fast 404 checks the given URL directly against the aliases in the database table of url_alias. It is not aware of Sub Pathauto nor it's depth setting.

My temporary workaround is to disable the path checking by Fast 404 using $conf['fast_404_path_check'] = FALSE; in the settings.php file.

Steps to reproduce

  1. Install the subpathauto module
  2. Visit a node edit form (this should return a 404)
  3. Visit a node revision (this should return a 404)
  4. Try to revert a node revision (this should return a 404)

Proposed resolution

Fast 404 allows other modules to override the queries used to check agains the database tables. Sub-pathauto adds its own logic.

Remaining tasks

Discuss the solution.
Fix it.

User interface changes

none

API changes

Add a hook to fast_404 to allow interaction by other modules

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands sutharsan

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

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

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