Skip to content

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

@phil9690

Description

@phil9690

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions