Open tiagofcp opened 4 years ago
Interesting that no one has run into this before.
However you shouldn't need to manually add a tag. Unpublished pages should 404 automatically. Are you logged into the Control Panel? Drafts are accessible on the front-end while logged in.
Without the {{ 404 }}, does the draft URL 404 when you use an Incognito browser window?
yes its rendering the pages when they are in draft, any one with the URL can access them, and since they appear on the sitemap google is indexing them
But are they being rendered when you visit in a private browser window?
ok without session opened its giving a 404, but they still appear on the sitemap but its a issue with advarkSEO, because if we disable the main language they disapear from all sitemaps
We get this error as well. However it affects posts that are published with a future date and not drafts.
We would want to publish to a future date, so we check in the template if the date of the post is in the future and if so return the 404-tag - then we get this error.
Drafts doesn't really solve this since they would have to be manually published.
Describe the bug Tried to generate a 404 with tag {{ 404}} page when a user visits a unpublished page
To Reproduce apply the {{ 404 }} on your layout
Expected behavior Show a 404 page with the actual url
Screenshots
Environment details (please complete the following information):