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:
- Create a page
- Edit the newly created page
- Remove title and hit save
- Click "< Back"
- 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.
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:
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):
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
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.