BookChild global scope is messing with column selection of page/chapter queries #4448

Closed
opened 2026-02-05 08:54:39 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @ssddanbrown on GitHub (Feb 1, 2024).

Originally assigned to: @ssddanbrown on GitHub.

Specifically:

16af833124/app/Entities/Models/BookChild.php (L25-L32)

The addSelect, where no current selection exists, auto selects all columns.
This is leading to way too much data being loaded in where we're trying to be selective, like almost any loading of pages/chapters for lists.

Need to ideally make this select work with others, or otherwise find another route for this.
Will require attention to be payed to what fields are being returned in API responses, as this could now potentially be a backward compatibility break. Relevant to all endpoints showing chapters/pages, maybe including those on parent items (books->show).

Originally created by @ssddanbrown on GitHub (Feb 1, 2024). Originally assigned to: @ssddanbrown on GitHub. Specifically: https://github.com/BookStackApp/BookStack/blob/16af8331244518bfebfb5c1b7eeacec5545c0cfd/app/Entities/Models/BookChild.php#L25-L32 The `addSelect`, where no current selection exists, auto selects all columns. This is leading to way too much data being loaded in where we're trying to be selective, like almost any loading of pages/chapters for lists. Need to ideally make this select work with others, or otherwise find another route for this. Will require attention to be payed to what fields are being returned in API responses, as this could now potentially be a backward compatibility break. Relevant to all endpoints showing chapters/pages, maybe including those on parent items (books->show).
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 08:54:39 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 13, 2024):

Addressed within #4827

@ssddanbrown commented on GitHub (Feb 13, 2024): Addressed within #4827
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4448