-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
404 and around #708
Comments
This comment was marked as outdated.
This comment was marked as outdated.
I'm afraid there isn't. There were plans for Pico 4.0 to fix that (by adding "virtual pages"), but that never materialized. Since your plugin is taking control anyway, you don't really have to care about
No, |
Ok, thanks. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! 👍 |
If I create a plugin that serves a page when I request
site/fakepage
, for example usingonPageRendering
with$twigTemplate = 'fakepage.twig'
, Pico still considers this as 404 content. On the user side, everything works fine, butis404Content()
returns true (similarly,on404ContentLoaded(&$rawContent)
is also triggered). Is there a way to work around this? For instance, if I want to log all the requests that result in a 404, calls tosite/fakepage
would also be logged as 404s, but they shouldn't be.Another question about 404 behavior: If I create a
404.md
page and point tomysite/404
, Pico serves the 404 page, but with a200 OK
response, because the page actually exists. Is it an expected behavior? A better practice would be to only allow a_404.md
file, which is not accessible directly but is used by Pico to serve a 404 message when there is a bad request. This approach, like before, avoids false positives when plugins check foris404Content()
.The text was updated successfully, but these errors were encountered: