-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the Bug
A saved draft is not removed from the database by clicking Discard Draft at the top of the page.
Steps to Reproduce
- Create a new page (or edit an existing)
- Type some changes
- Save your draft using the link at the top of the edit page
- Discard your draft using the link at the top of the edit page
- Refresh the browser window (or open the MySQL database)
- You are now editing the same draft from earlier (or find the draft still in the MySQL database)
Expected Behaviour
The button named Discard Draft should remove the stored changes from the database so a user doesn't go in to edit the page later and save edits from an old draft that were not intended to be "remembered". Ideally this will also prevent the warning about unsaved changes when you are navigating away from the page.
Screenshots or Additional Context
The two buttons in question are at the top of the page and look like this:
Browser Details
Chrome Version 108.0.5359.125 on Windows 10 21H2
Exact BookStack Version
v22.11.1
PHP Version
PHP 8.0.25
Hosting Environment
Docker Image (linuxserver/bookstack:latest) hosted behind Nginx Proxy Manager.
Reproduced on https://demo.bookstackapp.com/ logged in as admin.
Originally discovered on older version (v21 something I believe) but looking at the docs and page-editor.js
it might have been this way for a while. If it was intentional - my apologies.