Apostrophe breaks advanced filter on exact matches

Server Version#: 1.30.2.6563 (Windows 64-bit)
Player Version#: Plex Web 4.99.2
Looking at tracks in my music library with advanced filters, there is a bug with any of the free text search fields (Artist Title, Album Title, and Track Title). If you use either the “is” or “is not” criteria and start your search with a single apostrophe and then any letter in the search field, it throws up the “Something went wrong / And unexpected error occurred.” message on the screen. In the console log, these errors came up:

Jan 26, 2023 10:37:56.200 [19588] Error — [Req#17bc47] SQLITE3:0x7ff7c43f5d20, 1, near "s": syntax error in "select count(*) from (select distinct(metadata_items.id) from metadata_items   join metadata_items as parents on parents.id=metadata_items.parent_id  join metadata_items as grandpare
Jan 26, 2023 10:37:56.200 [19588] Error — Got exception from request handler: sqlite3_statement_backend::prepare: near "s": syntax error for SQL: select count(*) from (select distinct(metadata_items.id) from metadata_items   join metadata_items as parents on parents.id=metadata_items.parent_id  join metadata_items as grandparents on grandparents.id=parents.parent_id  join media_items on media_items.metadata_item_id=metadata_items.id  join media_parts on media_parts.media_item_id=media_items.id  where metadata_items.library_section_id in (13) and (metadata_items.metadata_type=10 and metadata_items.title LIKE ''s) )
Jan 26, 2023 10:37:56.240 [19588] Error — [Req#17bc57] Unknown metadata type: folder
Jan 26, 2023 10:37:56.240 [19588] Error — [Req#17bc57] SQLITE3:0x7ff7c43f5d20, 1, near "s": syntax error in "select count(*) from (select distinct(metadata_items.id) from metadata_items   join metadata_items as parents on parents.id=metadata_items.parent_id  join metadata_items as grandpare
Jan 26, 2023 10:37:56.240 [19588] Error — Got exception from request handler: sqlite3_statement_backend::prepare: near "s": syntax error for SQL: select count(*) from (select distinct(metadata_items.id) from metadata_items   join metadata_items as parents on parents.id=metadata_items.parent_id  join metadata_items as grandparents on grandparents.id=parents.parent_id  join media_items on media_items.metadata_item_id=metadata_items.id  join media_parts on media_parts.media_item_id=media_items.id  where metadata_items.library_section_id in (13) and (metadata_items.metadata_type=10 and metadata_items.title LIKE ''s) )

This doesn’t happen if you’re using any of the other criteria types (contains, does not contain, begins with, ends with). And if the apostrophe is in the middle of the search term, it’s fine as well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.