Page disappeared in Bookstack #4420

Closed
opened 2026-02-05 08:51:16 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @PinkFreud on GitHub (Jan 23, 2024).

Describe the Bug

The page in question still exists in the db, but going to the page's URL returns Page not found.

Steps to Reproduce

Visiting https://<site>/books/<book_slug>/page/<page_slug> returns 'Page not found'.

Expected Behaviour

Existing page should be loaded and displayed.

Screenshots or Additional Context

Sorry, folks - I'm going to have to anonymize data as much as possible, as the data isn't mine to share.

As noted above, a page which should exist simply returns 'Page not found'. It's no longer linked in any books, and going to the page url directly returns the aforementioned error.

The page revision history shows (from the DB, as this is easier to anonymize):

> select id, page_id, created_at, created_by, updated_at, type, revision_number, summary from page_revisions where page_id=4852;
+-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+
| id    | page_id | created_at          | created_by | updated_at          | type         | revision_number | summary         |
+-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+
|  9884 |    4852 | 2023-11-30 19:36:26 |         34 | 2023-11-30 19:36:26 | version      |               1 | Initial publish |
|  9886 |    4852 | 2023-11-30 19:45:55 |         34 | 2023-11-30 19:45:55 | version      |               2 |                 |
|  9888 |    4852 | 2023-11-30 19:48:19 |         34 | 2023-11-30 19:48:19 | version      |               3 |                 |
|  9890 |    4852 | 2023-11-30 19:51:29 |         34 | 2023-11-30 19:51:29 | version      |               4 |                 |
|  9891 |    4852 | 2023-11-30 19:51:38 |         34 | 2023-11-30 19:51:38 | version      |               5 |                 |
|  9892 |    4852 | 2023-11-30 19:53:55 |         34 | 2023-11-30 19:53:55 | version      |               6 |                 |
| 11431 |    4852 | 2023-12-04 14:52:02 |         17 | 2023-12-04 14:52:02 | version      |               7 |                 |
| 11432 |    4852 | 2023-12-04 14:52:27 |         17 | 2023-12-04 14:52:27 | version      |               8 |                 |
| 11436 |    4852 | 2023-12-04 14:54:07 |         17 | 2023-12-04 14:54:07 | version      |               9 |                 |
| 11456 |    4852 | 2023-12-04 15:01:24 |         17 | 2023-12-04 15:01:24 | version      |              10 |                 |
| 11514 |    4852 | 2023-12-04 15:05:52 |         17 | 2023-12-04 15:05:52 | version      |              11 |                 |
| 11544 |    4852 | 2023-12-04 15:14:41 |         17 | 2023-12-04 15:14:41 | version      |              12 |                 |
| 19298 |    4852 | 2023-12-13 21:37:41 |         34 | 2023-12-13 21:37:41 | version      |              13 |                 |
| 49712 |    4852 | 2024-01-15 14:15:43 |         17 | 2024-01-15 14:15:43 | version      |              14 |                 |
| 49715 |    4852 | 2024-01-15 20:17:28 |         17 | 2024-01-15 20:17:28 | update_draft |               0 | NULL            |
+-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+
15 rows in set (0.000 sec)

The page table entry for this page looks like:

> select id, book_id, chapter_id, draft, revision_count, deleted_at, owned_by, editor f
rom pages where id=4852;
+------+---------+------------+-------+----------------+------------+----------+--------+
| id   | book_id | chapter_id | draft | revision_count | deleted_at | owned_by | editor |
+------+---------+------------+-------+----------------+------------+----------+--------+
| 4852 |      61 |         96 |     0 |             14 | NULL       |       34 |        |
+------+---------+------------+-------+----------------+------------+----------+--------+
1 row in set (0.000 sec)

There's no deletion record for this page, either:

> select * from deletions where deletable_type='page' and deletable_id=4852;
Empty set (0.000 sec)

User # 17 reports that they cannot see the page either, nor any drafts for said page.

Can someone shed some light on what could have happened to this page? So far, I've failed to figure out why this page simply does not show up in Bookstack.

Browser Details

No response

Exact BookStack Version

v23.10.1

Originally created by @PinkFreud on GitHub (Jan 23, 2024). ### Describe the Bug The page in question still exists in the db, but going to the page's URL returns Page not found. ### Steps to Reproduce Visiting `https://<site>/books/<book_slug>/page/<page_slug>` returns 'Page not found'. ### Expected Behaviour Existing page should be loaded and displayed. ### Screenshots or Additional Context Sorry, folks - I'm going to have to anonymize data as much as possible, as the data isn't mine to share. As noted above, a page which should exist simply returns 'Page not found'. It's no longer linked in any books, and going to the page url directly returns the aforementioned error. The page revision history shows (from the DB, as this is easier to anonymize): ``` > select id, page_id, created_at, created_by, updated_at, type, revision_number, summary from page_revisions where page_id=4852; +-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+ | id | page_id | created_at | created_by | updated_at | type | revision_number | summary | +-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+ | 9884 | 4852 | 2023-11-30 19:36:26 | 34 | 2023-11-30 19:36:26 | version | 1 | Initial publish | | 9886 | 4852 | 2023-11-30 19:45:55 | 34 | 2023-11-30 19:45:55 | version | 2 | | | 9888 | 4852 | 2023-11-30 19:48:19 | 34 | 2023-11-30 19:48:19 | version | 3 | | | 9890 | 4852 | 2023-11-30 19:51:29 | 34 | 2023-11-30 19:51:29 | version | 4 | | | 9891 | 4852 | 2023-11-30 19:51:38 | 34 | 2023-11-30 19:51:38 | version | 5 | | | 9892 | 4852 | 2023-11-30 19:53:55 | 34 | 2023-11-30 19:53:55 | version | 6 | | | 11431 | 4852 | 2023-12-04 14:52:02 | 17 | 2023-12-04 14:52:02 | version | 7 | | | 11432 | 4852 | 2023-12-04 14:52:27 | 17 | 2023-12-04 14:52:27 | version | 8 | | | 11436 | 4852 | 2023-12-04 14:54:07 | 17 | 2023-12-04 14:54:07 | version | 9 | | | 11456 | 4852 | 2023-12-04 15:01:24 | 17 | 2023-12-04 15:01:24 | version | 10 | | | 11514 | 4852 | 2023-12-04 15:05:52 | 17 | 2023-12-04 15:05:52 | version | 11 | | | 11544 | 4852 | 2023-12-04 15:14:41 | 17 | 2023-12-04 15:14:41 | version | 12 | | | 19298 | 4852 | 2023-12-13 21:37:41 | 34 | 2023-12-13 21:37:41 | version | 13 | | | 49712 | 4852 | 2024-01-15 14:15:43 | 17 | 2024-01-15 14:15:43 | version | 14 | | | 49715 | 4852 | 2024-01-15 20:17:28 | 17 | 2024-01-15 20:17:28 | update_draft | 0 | NULL | +-------+---------+---------------------+------------+---------------------+--------------+-----------------+-----------------+ 15 rows in set (0.000 sec) ``` The page table entry for this page looks like: ``` > select id, book_id, chapter_id, draft, revision_count, deleted_at, owned_by, editor f rom pages where id=4852; +------+---------+------------+-------+----------------+------------+----------+--------+ | id | book_id | chapter_id | draft | revision_count | deleted_at | owned_by | editor | +------+---------+------------+-------+----------------+------------+----------+--------+ | 4852 | 61 | 96 | 0 | 14 | NULL | 34 | | +------+---------+------------+-------+----------------+------------+----------+--------+ 1 row in set (0.000 sec) ``` There's no deletion record for this page, either: ``` > select * from deletions where deletable_type='page' and deletable_id=4852; Empty set (0.000 sec) ``` User # 17 reports that they cannot see the page either, nor any drafts for said page. Can someone shed some light on what could have happened to this page? So far, I've failed to figure out why this page simply does not show up in Bookstack. ### Browser Details _No response_ ### Exact BookStack Version v23.10.1
OVERLORD added the 🐛 Bug label 2026-02-05 08:51:16 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 23, 2024):

Can someone shed some light on what could have happened to this page?

Usually this means that either permissions have gone right, or permissions have gone wrong, depending on if permissions have been set.

You could try running the "Regenerate Access Permissions" command:
https://www.bookstackapp.com/docs/admin/commands/#regenerate-access-permissions
Then see if it re-appears. If it does, that usually means that something went wrong with permission creation (on page save or permission change). This would usually appear to the user as an error though.

Otherwise, if it does not appear, permissions may have been set.
The default admin user role should always retain visibility of content, so you could check with a use role assigned to this role if not already.

@ssddanbrown commented on GitHub (Jan 23, 2024): > Can someone shed some light on what could have happened to this page? Usually this means that either permissions have gone right, or permissions have gone wrong, depending on if permissions have been set. You could try running the "Regenerate Access Permissions" command: https://www.bookstackapp.com/docs/admin/commands/#regenerate-access-permissions Then see if it re-appears. If it does, that usually means that something went wrong with permission creation (on page save or permission change). This would usually appear to the user as an error though. Otherwise, if it does not appear, permissions may have been set. The default admin user role should always retain visibility of content, so you could check with a use role assigned to this role if not already.
Author
Owner

@PinkFreud commented on GitHub (Jan 23, 2024):

It looks like something went wrong with permissions, as regenerating permissions fixed the issue.

My account is an admin, and even I couldn't see the page!

Anyway, thank you! I'll keep this one in mind if this issue reoccurs.

@PinkFreud commented on GitHub (Jan 23, 2024): It looks like something went wrong with permissions, as regenerating permissions fixed the issue. My account is an admin, and even I couldn't see the page! Anyway, thank you! I'll keep this one in mind if this issue reoccurs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4420