Skip to content
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

Unable to reach the 404 page with this module in place #2

Open
jansensan opened this issue Apr 14, 2021 · 6 comments
Open

Unable to reach the 404 page with this module in place #2

jansensan opened this issue Apr 14, 2021 · 6 comments
Labels

Comments

@jansensan
Copy link

jansensan commented Apr 14, 2021

For projects with this module, an actual 404 leads to the login page. The following projects are all using this module, and a URL which should show the 404 actually show the login page:

Either there is a bug (maybe? not sure) or there is some additional documentation required to clarify how to ensure that an actual 404 presents the 404 template.

For pages that exist but require permissions, I agree this module does the proper job (redirecting to login), but when an actual 404 is needed, the user experience of a visitor being thrown to the login page rather than the 404 template is not useful.

Note that this issue replaces the one originally reported on apostrophe-workflow, as it is most likely this module (apostrophe-second-chance-login) that is the cause.

@boutell
Copy link
Member

boutell commented Apr 14, 2021

This module does work as designed in our experience — is there a particular configuration or combination of modules needed to trigger this "shows login button no matter what" behavior?

@jansensan
Copy link
Author

jansensan commented Apr 15, 2021

The projects are also using apostrophe-workflow, could that affect the behaviour?

As a user (as opposed to anon), the 404 page is reachable, and it shows as unpublished (linked to the workflow?), but clicking on the big red button offers no option to publish a notFound template... (which sort of makes sense).

@boutell
Copy link
Member

boutell commented Apr 15, 2021 via email

@jansensan
Copy link
Author

Will create this proto/boilerplate/test as soon as I can (likely mid next week) and will come back to you here

@jansensan
Copy link
Author

@boutell So I created a project from the boilerplate, added workflow and second chance login, and indeed, an actual 404 does go to the login page.

URL: https://github.com/jansensan/apostrophecms-404-issue
TODO: create the admin user (as you would when running the boilerplate project)

These would be my behavioral expectations:

  • If the page/piece exists and is not covered by the current permissions (e.g. anon), yes lead the user to the login page
  • If the page/piece does not exist, the 404 page/template should be served to the user

@boutell
Copy link
Member

boutell commented Apr 20, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants