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

BUG: Deleting all pages causes error when viewing front end #2

Open
phil9690 opened this issue Nov 5, 2018 · 1 comment
Open

BUG: Deleting all pages causes error when viewing front end #2

phil9690 opened this issue Nov 5, 2018 · 1 comment
Labels
bug Something isn't working feature-request New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@phil9690
Copy link

phil9690 commented Nov 5, 2018

Environment

  • Ruby 2.4.1
  • Rails 5.2.1
  • Integral v1.0.1

Description of issue

Deleting all pages causes the front end to break.

Current behaviour

Error Couldn't find Integral::Page with 'id'=1 [WHERE integral_pages.deleted_at IS NULL] is thrown when all the pages are deleted and a user tries to navigate to the front end.

Expected behaviour

  • Option A. For the user to be blocked from deleting all pages.
  • Option B. Have a demo page that only becomes present when there are no pages available, or friendly error page for non logged in users saying there is no content and another page for logged in users/admins to create their first page.
@phil9690 phil9690 changed the title Deleting all pages causes error when viewing front end BUG: Deleting all pages causes error when viewing front end Nov 5, 2018
@patricklindsay patricklindsay added feature-request New feature or request help wanted Extra attention is needed good first issue Good for newcomers bug Something isn't working labels Nov 8, 2018
@patricklindsay
Copy link
Member

I'd go with option A.

Before Integral allows the user to delete a page it should first check if that page is the homepage. If it is return error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature-request New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants