[PR #3972] [MERGED] Fix server crash remove column name ambiguity #3966 #4133

Closed
opened 2026-04-25 00:18:27 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3972
Author: @advplyr
Created: 2/12/2025
Status: Merged
Merged: 2/12/2025
Merged by: @advplyr

Base: masterHead: remove-col-ambiguity


📝 Commits (1)

  • a34813b Fix server crash remove column name ambiguity #3966

📊 Changes

2 files changed (+7 additions, -7 deletions)

View changed files

📝 server/utils/queries/libraryItemsBookFilters.js (+4 -4)
📝 server/utils/queries/libraryItemsPodcastFilters.js (+3 -3)

📄 Description

Brief summary

Fixes server crash when making certain queries with title/titleIgnorePrefix

Which issue is fixed?

Fixes #3966

In-depth Description

When making custom queries in Sequelize we need to include the table name along with the column name to prevent issues of column ambiguity.

There are 3 cases I found where this happens.

  1. Searching in the library controller search endpoint
  2. Library items query for book libraries when sorting ignore prefix is enabled
  3. Library items query when collapse series is enabled and sorting ignore prefix is enabled

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3972 **Author:** [@advplyr](https://github.com/advplyr) **Created:** 2/12/2025 **Status:** ✅ Merged **Merged:** 2/12/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `remove-col-ambiguity` --- ### 📝 Commits (1) - [`a34813b`](https://github.com/advplyr/audiobookshelf/commit/a34813b3ab81fc96ccea0152a7ec400c4e31e70d) Fix server crash remove column name ambiguity #3966 ### 📊 Changes **2 files changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/queries/libraryItemsBookFilters.js` (+4 -4) 📝 `server/utils/queries/libraryItemsPodcastFilters.js` (+3 -3) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary Fixes server crash when making certain queries with title/titleIgnorePrefix ## Which issue is fixed? Fixes #3966 ## In-depth Description When making custom queries in Sequelize we need to include the table name along with the column name to prevent issues of column ambiguity. There are 3 cases I found where this happens. 1. Searching in the library controller search endpoint 2. Library items query for book libraries when sorting ignore prefix is enabled 3. Library items query when collapse series is enabled and sorting ignore prefix is enabled --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:27 +02:00
adam closed this issue 2026-04-25 00:18:27 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4133