-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Error when trying to reorder pages/chapters of a book #5595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @lucasplcorrea, |
Yes, is a default linuxserver image, the startup log:
|
Okay, so there's a clear issue.
|
I haven't done any migration recently, but some time ago, I moved the system behind a domain, changing the URL; it was local and I published it on the internet. That was the last major change I made to the system. On the other hand, I don't remember having reordered any pages since then. In the system logs, I see records of book_sort already done after this migration, so I don't believe that's specifically the problem. In addition, when I try to access the path you suggested: "Sort Rules" (Settings > Sort Rules), the same error occurs. I searched the system logs for sort_rule_create/update/dele, but I didn't find any records of rules in that sense (I imagined that another user could have created something, but I didn't find anything). |
Okay, thanks for the extra info.
|
1 - Yes, I use Watchtower, which automatically updates my containers |
Alrighty, thanks for the answers. In regards to watchtower, I often hear of these kinds of errors occur in watch-tower based environments. Based on a quick previous look, i assume some kind of timeout can occur during the upgrade leaving things in a bad state. Before anything else, backup your data. Especially the database. Now, can you enter the database and drop the |
I apologize for the delay in responding, yesterday was a holiday in my city and I couldn't work on it. I did what you asked, dropped the table, restarted the container, and adjusted the watchtower only for notifications. During the restart, I even saw that it executes the table creation migrations in question, but in Dbeaver they are not displayed, and the error persists when accessing the page reordering section. I will send you some prints and logs for analysis.
if there is any way to perform this migration manually, maybe I could try it before performing the action, I made a backup as suggested. |
Any news regarding this case? |
@lucasplcorrea no, not really.
What exactly is this error? What are you seeing? What are the logged messages? |
No, it only appeared once! In the logs I find the following error filtering by | grep sort
|
Okay, that's what I'd expect from a working setup. Means the database state is stable.
They shouldn't do, since they've already ran (and there's no further migrations in the recent patch releases).
This is so strange. I can't see how the table does not exist, since you saw the migrations run in the log, which would have had to create this table. Otherwise, you could access a shell in the active BookStack container, then enter the |
That all looks as expected. What about this from the BookStack container (ran like before)? php artisan tinker --execute='dd(array_filter(Schema::getTables(), fn($table) => str_contains($table["name"], "sort")));' This should tell us if the table exists from the PHP code perspective. |
Okay, that's super odd. Before that though, can you check your |
@lucasplcorrea Okay, lets try allowing the migrations to re-run. Before anything, I'd strongly advise a full backup of the instance data, especially the database data. In the database, look at the With that done, restart the BookStack container, watching first start-up logs again. |
Works like a charm. I deleted the rows as suggested, and on reboot the tables were recreated, I can order the pages again. Thanks for the support. Now I will run the container update. |
Great news, Good to hear that finally worked! Not sure why it didn't before, very strange! |
Describe the Bug
Ao clicar em ordenar, uma mensagem de erro é exibida
Steps to Reproduce
Expected Behaviour
Reordering book pages
Screenshots or Additional Context
When analyzing the logs in /app/www/storage/logs, searching for "sort", I received the following record:
My environment runs on docker, BookStack version: v25.02.1
DB: Maria DB 11.4.5
Browser Details
No response
Exact BookStack Version
v25.02.1
The text was updated successfully, but these errors were encountered: