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
- Install the subpathauto module
- Visit a node edit form (this should return a 404)
- Visit a node revision (this should return a 404)
- 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
Comment | File | Size | Author |
---|---|---|---|
#8 | 2471983-8.patch | 1.21 KB | seanB |
| |||
#8 | interdiff-6-8.txt | 882 bytes | seanB |
#6 | 2471983-6.patch | 1.12 KB | seanB |
| |||
#6 | interdiff-4-6.txt | 922 bytes | seanB |
#4 | 2471983-4.patch | 799 bytes | seanB |
Comments
Comment #1
seanBThis adds an optional extra check for subpathauto which removes the last part of the URL when checking for paths.
Comment #2
seanBLet's run a test for 8.x since that is what the patch is for.
Comment #3
NickDickinsonWildeDoesn't seem to apply/incomplete patch?
Comment #4
seanBReroll for 3.x.
Comment #5
seanBWhoops, this is a patch for the Fast404 module. Sorry about that. Let's move the issue.
Comment #6
seanBAttached patch adds support for node revisions.
Comment #7
Kristen PolThis needs concrete steps to reproduce in the issue summary so tagging.
Comment #8
seanBThe revision related URLs can be more than just
/revisions/[ID]/view
, eg/revisions/[ID]/revert
and/revisions/[ID]/revert/nl
. Updated to regex to support this. Also added a check for the subpathauto module.Tried to update the IS as well to provide basic steps to reproduce the issue.
Comment #9
Kristen PolThanks! Tagging for testing.