stash icon indicating copy to clipboard operation
stash copied to clipboard

[Bug Report] Performer Page, Scene Tab, intermittent SQL error

Open elkorol opened this issue 1 year ago • 2 comments

Describe the bug Every now and then when I open a performer from the performers page in a new tab in which that performer has scenes, so it defaults to the scenes tab, I get an SQL error. I does not happen all the time, so I don't know how to reproduce. But clicking on the images or galleries tab and back to scenes, the scenes always load correctly without error. This has been happening for a few versions so far, i've always just ignored it until now.

error finding IDs: running query: SELECT DISTINCT scenes.id FROM scenes LEFT JOIN scenes_files ON scenes_files.scene_id = scenes.id LEFT JOIN files ON scenes_files.file_id = files.id LEFT JOIN folders ON files.parent_folder_id = folders.id LEFT JOIN files_fingerprints ON files_fingerprints.file_id = scenes_files.file_id LEFT JOIN scene_markers ON scene_markers.scene_id = scenes.id LEFT JOIN performers_scenes AS performers_join ON performers_join.scene_id = scenes.id WHERE (scenes.title LIKE ? OR scenes.details LIKE ? OR folders.path || '\' || files.basename LIKE ? OR files_fingerprints.fingerprint LIKE ? OR scene_markers.title LIKE ?) AND (performers_join.performer_id IN (?)) GROUP BY scenes.id HAVING (count(distinct performers_join.performer_id) IS 1) ORDER BY scenes.name COLLATE NATURAL_CI ASC, COALESCE(scenes.title, scenes.id) COLLATE NATURAL_CI ASC LIMIT 40 OFFSET 0 [[%mfcouple% %mfcouple% %mfcouple% %mfcouple% %mfcouple% 2015]]: error executing `SELECT DISTINCT scenes.id FROM scenes LEFT JOIN scenes_files ON scenes_files.scene_id = scenes.id LEFT JOIN files ON scenes_files.file_id = files.id LEFT JOIN folders ON files.parent_folder_id = folders.id LEFT JOIN files_fingerprints ON files_fingerprints.file_id = scenes_files.file_id LEFT JOIN scene_markers ON scene_markers.scene_id = scenes.id LEFT JOIN performers_scenes AS performers_join ON performers_join.scene_id = scenes.id WHERE (scenes.title LIKE ? OR scenes.details LIKE ? OR folders.path || '\' || files.basename LIKE ? OR files_fingerprints.fingerprint LIKE ? OR scene_markers.title LIKE ?) AND (performers_join.performer_id IN (?)) GROUP BY scenes.id HAVING (count(distinct performers_join.performer_id) IS 1) ORDER BY scenes.name COLLATE NATURAL_CI ASC, COALESCE(scenes.title, scenes.id) COLLATE NATURAL_CI ASC LIMIT 40 OFFSET 0 ` [[%mfcouple% %mfcouple% %mfcouple% %mfcouple% %mfcouple% 2015]]: no such column: scenes.name

Stash Version: (from Settings -> About): v0.25.1 - Build hash: bf7cb78d Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: Version 122.0.6261.129 (Official Build) (64-bit)

elkorol avatar Mar 23 '24 04:03 elkorol

Upon further thinking about it, it seems the movies object is the only one that can sort by name, so it seems like the .name component is being activated and persisted then mixed in with the scene object in the sort options to give scene.name which does not exist.

elkorol avatar Mar 23 '24 04:03 elkorol