Skip to content

Bug: Clicking Save Page With Empty Title Makes "< Back" Button Useless #2834

Description

@ReaHe

Describe the bug
If you set your title to be empty when you click save on a page, Bookstack prevents this and causes the back ("< Back") button to no longer work as intended. It will instead continue to bring you back to the current page your editing.
P.S. It personally seems as if when you hit save and the error "the name field is required" (when the title is empy), instead of just printing an immediate error, the entire page is updated with the error. Therefore the previous page reference is updated to before the error occurred which is when you clicked "edit page" instead of not updating the previous page reference at all and keeping it to before you clicked "edit page".

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a page
  2. Edit the newly created page
  3. Remove title and hit save
  4. Click "< Back"
  5. You can no longer go back to the previous menu with the "< Back" button anymore.

Expected behavior
I would expect the "< Back" button to always bring back to previous menu I was at before hitting "new" or "edit" page.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.29.3
  • PHP Version:
    PHP 7.3.18 (cli) (built: May 15 2020 16:10:31) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies
  • Hosting Method (Nginx/Apache/Docker): Docker

Additional context
I came upon this problem in the hopes that when removing the title and leaving the content empty the page instead would be deleted (if it was pre-existing). To me this is a low priority bug that no one would realistically do this and I'm just documenting the existence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions