New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mezzanine returns 200 for non-existent subpages. #1090
Comments
Thanks for the report. |
WOW! That's was fast! =) |
Hmm. I guess it's hard to argue that this is not a valid bug, but I was making use of it – using the part of the slug following the page's slug as a kind of query string in a page processor (in the same way as a third-party app mounted in Mezzanine's page tree might). One way to allow this kind of thing would be to run the page processors before calling the page view. That way you can just skip Mezzanine's page view by returning a response from your processor. Does that sound reasonable Steve? |
Hi, Alex! You can allways catch request before it go to a page processor, and direct it to whatever you want. But default behaviour should be straightforward, because otherwise it becomes confusing. If page not exist, CMS should return 404, because it is a special code for non-existent content, it's a standard. |
Alex that sounds like a great solution |
OK, I'll submit a patch shortly. It has the added bonus of not generating a response for the regular page view if it's never going to be seen. |
Hi!
I've found strange bug with lastest mezzanine instalations. It is not handling 404 for subpages of subpages.
Example:
/ - will return 200 and show main page (right behaviour)
/fjshdkjhfkjds/ - will return 404 (right behaviour)
/existent-page/ - will return 200 and show existent-page page (right behaviour)
/existent-page/glkjfdgkljfd/ - will return 200 and show existent-page page (wrong!)
/existent-page/glkjfdgkljfd/kjlksajjsk/ - will return 200 and show existent-page page (wrong!)
and so-on.
was checked with multiple projects on newly created virtualenvs.
The text was updated successfully, but these errors were encountered: