Empty pages are saved as drafts #5342

Closed
opened 2026-02-05 09:58:55 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @prohtex on GitHub (Jul 2, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

One of the things I love about BookStack is all the little thoughtful touches-everything is where I expect it to be, and there's very little clutter, feature creep, UI crowding, etc. Performance is incredible.

In keeping with this spirit of less-is-more, I noticed a strange behavior recently. When a page is created and not explicitly deleted, the empty page is saved as a draft. The expected behavior would be that an empty page (one with no title or content) is not saved as a draft. Users are backing out of creating new pages (when, for example, they are put in the wrong place) and those blank pages are getting saved, requiring a few extra steps to delete.

I'm wondering if this is normal, or if one of my Javascript injections is putting something in the blank page that's causing it to be saved.

Exact BookStack Version

Latest

Log Content


Hosting Environment

Docker

Originally created by @prohtex on GitHub (Jul 2, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario One of the things I love about BookStack is all the little thoughtful touches-everything is where I expect it to be, and there's very little clutter, feature creep, UI crowding, etc. Performance is incredible. In keeping with this spirit of less-is-more, I noticed a strange behavior recently. When a page is created and not explicitly deleted, the empty page is saved as a draft. The expected behavior would be that an empty page (one with no title or content) is not saved as a draft. Users are backing out of creating new pages (when, for example, they are put in the wrong place) and those blank pages are getting saved, requiring a few extra steps to delete. I'm wondering if this is normal, or if one of my Javascript injections is putting something in the blank page that's causing it to be saved. ### Exact BookStack Version Latest ### Log Content ```text ``` ### Hosting Environment Docker
OVERLORD added the 🐕 Support label 2026-02-05 09:58:55 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 2, 2025):

Hi @prohtex,
Yeah, that's normal.

We really need to have the page created by the time the user reaches the editor to provide as a target for things like uploaded images, attachments etc... otherwise we'd need to have a lot of extra handling involved.
Kinda similar for trying to specifically handle the user backing out, since we'd need to specifically identify and handle such an event.

As an easier option, maybe, while in this initial draft state, we could more prominently feature some kind of "Discard" option (which does exist albeit fairly hidden in the draft menu and currently requires an extra step in the process via its own delete page). I'm not sure if that would just be mostly missed/avoided too though.

@ssddanbrown commented on GitHub (Jul 2, 2025): Hi @prohtex, Yeah, that's normal. We really need to have the page created by the time the user reaches the editor to provide as a target for things like uploaded images, attachments etc... otherwise we'd need to have a lot of extra handling involved. Kinda similar for trying to specifically handle the user backing out, since we'd need to specifically identify and handle such an event. As an easier option, maybe, while in this initial draft state, we could more prominently feature some kind of "Discard" option (which does exist albeit fairly hidden in the draft menu and currently requires an extra step in the process via its own delete page). I'm not sure if that would just be mostly missed/avoided too though.
Author
Owner

@prohtex commented on GitHub (Jul 2, 2025):

As an easier option, maybe, while in this initial draft state, we could more prominently feature some kind of "Discard" option (which does exist albeit fairly hidden in the draft menu and currently requires an extra step in the process via its own delete page). I'm not sure if that would just be mostly missed/avoided too though.

What if the "Back" action performs an additional check, and if the title of the page is still "New Page," and the content is empty (including attachments, tags, etc), the draft is deleted?

@prohtex commented on GitHub (Jul 2, 2025): > As an easier option, maybe, while in this initial draft state, we could more prominently feature some kind of "Discard" option (which does exist albeit fairly hidden in the draft menu and currently requires an extra step in the process via its own delete page). I'm not sure if that would just be mostly missed/avoided too though. What if the "Back" action performs an additional check, and if the title of the page is still "New Page," and the content is empty (including attachments, tags, etc), the draft is deleted?
Author
Owner

@ssddanbrown commented on GitHub (Jul 2, 2025):

Yeah, that's another option, but then we get into the extra handling involved to detect that state and to have a specific back route action. All doable, just a bit of extra faff as we would need specific handling. Would want to add specific change title change handling (to avoid checking against each language possibility and to avoid ignoring intended cross-language changes) and check of lack of editor text (not just empty as the editors will send content when empty).
Then there's still the question if that button is actually used or are users actually using browser controls or other navigation buttons/actions.

Either way, I'm going to close this off since the original question has been answered and the fundamental desire/request is already open in #1147.

@ssddanbrown commented on GitHub (Jul 2, 2025): Yeah, that's another option, but then we get into the extra handling involved to detect that state and to have a specific back route action. All doable, just a bit of extra faff as we would need specific handling. Would want to add specific change title change handling (to avoid checking against each language possibility and to avoid ignoring intended cross-language changes) and check of lack of editor text (not just empty as the editors will send content when empty). Then there's still the question if that button is actually used or are users actually using browser controls or other navigation buttons/actions. Either way, I'm going to close this off since the original question has been answered and the fundamental desire/request is already open in #1147.
Author
Owner

@prohtex commented on GitHub (Jul 2, 2025):

Thanks for explaining.

@prohtex commented on GitHub (Jul 2, 2025): Thanks for explaining.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5342