If a book is renamed while someone is editing a page, when they save the page an error is thrown and all edits are lost. #1754

Closed
opened 2026-02-05 01:46:59 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @cdbessig on GitHub (Jun 4, 2020).

Describe the bug
If a book is renamed while someone is editing a page, when they save the page an error is thrown and all edits are lost.

Let's say you are editing a page like: books/coolthing/page/common-problems

But someone else renames the book from coolthing to coolthingv1 while someone is editing the common-problems page, there is an error when the person goes to save the page and the changes are lost.

Steps To Reproduce
Steps to reproduce the behavior:
Open a page, click on edit, make some changes...do not save yet.
Open a new tab, change the book name.
On the tab with the edit open, click on save.

Expected behavior
Either the save would still function using book ids instead of permalinks or names of books.
Or when I go back on local storage my recent edits would populate and allow me to save it.

Screenshots
n/a

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings):
    BookStack v0.27.5
  • PHP Version:
    php74
  • Hosting Method (Nginx/Apache/Docker):
    Docker
Originally created by @cdbessig on GitHub (Jun 4, 2020). **Describe the bug** If a book is renamed while someone is editing a page, when they save the page an error is thrown and all edits are lost. Let's say you are editing a page like: books/coolthing/page/common-problems But someone else renames the book from coolthing to coolthingv1 while someone is editing the common-problems page, there is an error when the person goes to save the page and the changes are lost. **Steps To Reproduce** Steps to reproduce the behavior: Open a page, click on edit, make some changes...do not save yet. Open a new tab, change the book name. On the tab with the edit open, click on save. **Expected behavior** Either the save would still function using book ids instead of permalinks or names of books. Or when I go back on local storage my recent edits would populate and allow me to save it. **Screenshots** n/a **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.27.5 - PHP Version: php74 - Hosting Method (Nginx/Apache/Docker): Docker
Author
Owner

@cdbessig commented on GitHub (Jun 4, 2020):

ACtually, navigating back to the page and clicking on edit does prompt the user that they are editing the revision and brings back the changes... Awesome!

@cdbessig commented on GitHub (Jun 4, 2020): ACtually, navigating back to the page and clicking on edit does prompt the user that they are editing the revision and brings back the changes... Awesome!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1754