mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-22 19:07:15 +03:00
Fail loading page after upgrade from 25.7.3 to 25.11.0 #5488
Closed
opened 2026-02-05 10:06:11 +03:00 by OVERLORD
·
22 comments
No Branch/Tag Specified
development
l10n_development
release
v25-12
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.7
v25.12.6
v25.12.5
v25.12.4
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
pull-request
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#5488
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Janfy on GitHub (Nov 10, 2025).
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
Hi
I've just upgrade from bookstack 25.7.3 to 25.11.0.
Application starts correctly, i'm able to log in, browse books, shelves, but 've got an error browsing pages :
Error occurs on any page.
I restarted the container twice, but error still occurs.
I try to run migration manually, but i've got the same message as start logs :
INFO Nothing to migrate.Did i miss a migration step ?
Could you help me ?
Best regards.
Exact BookStack Version
25.11.0
Log Content
Hosting Environment
Hosted on k8s using simple deployment.yml file
Image :
solidnerd/bookstack:25.11.0@sha256:cdf6e3e6c486f036b08c39a3b6fe847592c3b26f8c7a278d21e9ba35a85cf27fDatabase image :
mysql:5.7.44@sha256:4bc6bc963e6d8443453676cae56536f4b8156d78bae03c0145cbe47c2aad73bb@Janfy commented on GitHub (Nov 10, 2025):
First start logs on 25.11.0:
@Sinepel commented on GitHub (Nov 10, 2025):
Hi !
I’m experiencing the same issue after upgrading from v25.7.3 to v25.11.0.
All caches have been cleared and there’s nothing left to migrate.
Here’s the error from the logs (path anonymized):
Thanks for your help
@ssddanbrown commented on GitHub (Nov 10, 2025):
@Janfy That's quite strange, those container start logs show it going through the database upgrades as expected, so not sure why you're getting an error about missing the required table.
If you manually inspect the database, is there a
entitiestable, with anidcolumn? If so, is there lots of data already in this table?@Sinepel Any details in regards to how this installation was installed, or how it's ran? Did you observe similar migration command output somewhat like that shown above?
@Sinepel commented on GitHub (Nov 10, 2025):
Hello, all migrations were completed successfully. The entities table has an id column with about 140 rows. I’m running PHP 8.2 and Apache 2.4 on a standard LAMP stack (no Docker).
@ssddanbrown commented on GitHub (Nov 10, 2025):
So the table, column, and data exists, but it can't see it. Strange!
I copied out the query from the error log provided by @Janfy, and ran that against my local database to ensure the query itself was not the issue, and that works fine.
Could maybe occur if the table was not viewable to the used database connection account, but that would be odd since it should have been created by the same user.
@Sinepel Do you know what version of MySQL-server you're running?
@Sinepel commented on GitHub (Nov 10, 2025):
Hi @ssddanbrown 👋
MySQL 5.7.27, PHP 8.2, Apache 2.4
The entities table exists and contains data (see attached screenshot).
All migrations return “Nothing to migrate.”
git pull shows Already up-to-date.
composer install and cache clears run successfully.
Still getting the “An unknown error occurred” message on every page view.
Screenshots attached:
1️⃣ entities table visible with data
2️⃣ migration result (Nothing to migrate.)
3️⃣ repo pull (Already up-to-date)
4️⃣ composer install output
5️⃣ error screen
Thanks for your help! 🙏
@arnauos commented on GitHub (Nov 10, 2025):
Hi, same issue here, after doing upgrade>migration all books load to "unknown error".
I'm still running a fairly old mysql version (5.7.44) so that may be the issue in my case? (it's listed as supported and I'm working on upgrading this before '26)
The errors I do see reference entities.id but I do see the field on the table and user permissions look fine.
Example error:
[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entities.id' in 'on clause' at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:406)I did rollback and restored the database backup and everything looks fine for now.
@ssddanbrown commented on GitHub (Nov 10, 2025):
Thanks @Sinepel and @arnauos for the extra information.
Yeah, I'm wondering if this is an older MySQL issue, or potentially environment where old database engines are in use. leading to MyISAM tables which can sometimes cause problems.
I'd be interested to see the output/result of the below SQL for any databases with issues, just to confirm if other engines are in play or not:
(You might need to change
bookstackif your bookstack DB has a different name)@arnauos commented on GitHub (Nov 10, 2025):
INNODB for all tables in my case
@ssddanbrown commented on GitHub (Nov 10, 2025):
Thanks @arnauos, that's helpful to rule out engine differences.
I have a potential lead now looking at the queries involved in deeper detail.
I'll do some deeper validation and testing tonight, and if I'm on the right trail, aim to produce a patch for tomorrow.
Dev notes
From an initial deeper dive, looks possibly related to how we're auto loading in related data via the entity scope with hard-coded table names for the join, but behind the scenes the tables involved can become aliases due to being in sub queries like this one here (which I believe reflects those in the reported error logs). This may not be usable in (some versions of) MySQL?
@Sinepel commented on GitHub (Nov 10, 2025):
Hi !
InnoDb too
@Janfy commented on GitHub (Nov 10, 2025):
idem: INNODB for all tables
@ssddanbrown commented on GitHub (Nov 10, 2025):
Following on from my comment above, replicating a similar simplified scenario of what I think is the issue, against MySQL the latest mysql:5.7 and mysql:8 containers leads to it causing the same fundamental error in the 5.7 container, but not in the 8 container. So I'm fairly confident this is due to how we're running sub queries with joins and aliases, and using the actual table name instead of the alias which Laravel is creating.
Now onto addressing in the code-base.
@doxliy89 commented on GitHub (Nov 10, 2025):
Got same problem.
mysql 8.0.43-0
ubuntu 24.04.2
nginx 1.26
php 8.3
installed a long time ago via script from manual
Last nginx error log messages before rollback to snapshot
@ssddanbrown commented on GitHub (Nov 10, 2025):
Prepared changes in #5878, just needs to go through deeper testing.
@Sinepel commented on GitHub (Nov 10, 2025):
Hi @ssddanbrown ,
I tested your commit on my end, and it is fully functional, if that helps with your testing!
@ssddanbrown commented on GitHub (Nov 11, 2025):
Alright, this should now be fixed via the changes in #5878.
As part of these changes, I've added some helper test scripts which allow us to run the full test suite against a range of DB versions we support to help discover these kinds of issues before release.
I've opened #5882 with an aim to clean this up and better integrate it into my processes, for the next feature release. As part of that I think it'd also be time to bump up our supported DB versions since they're quite old and unsupported at this stage.
I've also updated our automated testing coverage to specifically look at some of the queries made to help prevent regression in this area.
v25.11.1 will be released very soon with the fixes within.
Thanks all for your information, and validation to help track this (and your testing of changes @Sinepel!)
Apologies that this issue made it through to release.
@ssddanbrown commented on GitHub (Nov 11, 2025):
v25.11.1 now released: https://github.com/BookStackApp/BookStack/releases/tag/v25.11.1
May take a little while for docker-based environments to catch-up.
I'd appreciate confirmation of things working (or still broken) post-upgrade for those who have experienced this issue just so I can be sure of things before publicizing the fix further.
@arnauos commented on GitHub (Nov 11, 2025):
Hi, updated to 25.11.1 (docker) and working great 👍
Now time to prioritize my mysql version upgrade as it's taking too long (5.7 support ended two years ago)
@Sinepel commented on GitHub (Nov 11, 2025):
Hi!
My pleasure, thank you!
Everything is fine with me now! :)
@ssddanbrown commented on GitHub (Nov 11, 2025):
@Sinepel @arnauos thanks for confirming!
@Janfy commented on GitHub (Nov 11, 2025):
Works fine for me. 👌
Many thanks for the quick fix 🎉