I have a view page with a path set to foo/%/bar and an argument. When i browse to foo/123/bar/BAZ it returns the same result as foo/123/bar (where I guess it should return a 404). Has this happened to anyone and any idea how I can fix/troubleshoot it?
Thanks!
Comments
Comment #1
dawehnerLook at every drupal site out there. Let's take drupal.org
http://drupal.org/node/892396 has the same content as http://drupal.org/node/892396/foo and http://drupal.org/node/892396/foo/bar
So this is how the drupal menu system works.
To fix this issue you could set a argument which returns 404 where the argument is present.
Comment #3
lawrence commentedSorry to open this again, but take a look at this: http://drupal.org/project/views404
Setting this to feature request, hope I'm not crossing any boundaries. It'd be nice to have Views 404 integrated instead of having to install a whole new mod. Thanks for the great module!
Comment #4
merlinofchaos commentedYou don't need a whole new mod. There's several tutorials out there. All you need to do is to add a Global: Null argument to your view at the point you want the URL to end.
Because of the way the menu system works, it's not really plausible to do this automatically, you have to do it manually and intentionally. You'll find this behavior all over Drupal, this is not just Views.
Comment #5
codebymikey commentedThis behaviour can also be overridden for specific routes in a custom module using the following:
It could be theoretically made into a contrib module which allows users to set the max amount of URL components that are allowed for a specific menu route.
Comment #6
codebymikey commented