"sort by" in web interface - unhandled error

Bug #2054170 reported by robert a belanger
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned
calibre (Arch Linux)
New
Undecided
Unassigned

Bug Description

message generated when selecting sort field ( any sort field )

Error: Unhandled error
TypeError: all_settings[(intermediate value)] is undefined
Error at http://192.168.1.4:8080/:10878:130
Traceback (most recent call last):

change_sort@http://192.168.1.4:8080/:37072:16
set_library_option@http://192.168.1.4:8080/:10897:25
set@http://192.168.1.4:8080/:10878:130

using 7.5.1 linux ( Ubuntu 22.04.3 LTS,

I get the same sort of thing accessing Lib from my ipad ... i.e. no sorting allowed and the message has different location ( set@http://192.168.1.4:8080/:10878:130 )

I haven't a clue about re-creating

Revision history for this message
Kovid Goyal (kovid) wrote :

Fixed in next release or clear your browser cache and reload.

Changed in calibre:
status: New → Fix Released
no longer affects: archlinux
Revision history for this message
Samuel Fincher (squamuel5000) wrote :

This issue was bothering me, so I looked into it, and seem to have found the cause of the issue. In
"src/pyj/session.pyj", the UserSessionData.set function was using 'key-||-library_id' as the key to search the all_settings dictionary. However, since all_settings doesn't seem to keep track of the user's settings with the library_id, the resulting value was undefined and an error was thrown upon attempting to use .local on it.
I have attached a patch I created to mitigate the issue before the next stable release. While it did pass the tests provided in setup.py, I have not had much time to test it myself, so it may cause other issues I am unaware of.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.