[Bug 41133] New: Suggestions table sharing localStorage for all tabs can prevent records from loading
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41133 Bug ID: 41133 Summary: Suggestions table sharing localStorage for all tabs can prevent records from loading Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: blawlor@clamsnet.org QA Contact: testopia@bugs.koha-community.org On suggestion.pl the local storage DataTables_acqui_suggestions_suggestions which saves the state for pagination is shared for all tabs, which can cause tabs to load with a bad state and fail to load records. To recreate: 1. Use ktd --dbshell to add a bunch of random suggestions with different statuses: INSERT INTO suggestions (suggestedby, suggesteddate, title, status) SELECT borrowernumber, '2025-10-29', firstname, ELT(0.5 + RAND() *6, 'ASKED', 'CHECKED', 'ACCEPTED', 'REJECTED', 'ORDERED', 'AVAILABLE' ) from borrowers; 2. If you are lucky you will have one tab with more than 20 records and one with less than 20, if not use the ui to adjust the statuses so that you do 3. Click on a tab with more than 20 records 4. Click Next > to go to the second page 5. Notice in local storage now DataTables_acqui_suggestions_suggestions.start is now 20 6. Click on a tab with fewer than 20 records 7. Notice the table says something illogical like: Showing 21 to 11 of 11 entries 8. And no records load :( 9. Click <<First to fix the pagination issue 10. Notice DataTables_acqui_suggestions_suggestions.start is now 0 again 11. The table loads with records :) Showing 1 to 11 of 11 entries -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41133 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Suggestions table sharing |Datatables sharing Local |localStorage for all tabs |storage for pagination can |can prevent records from |prevent records from |loading |loading Status|NEW |CONFIRMED Component|Acquisitions |Architecture, internals, | |and plumbing --- Comment #1 from Brendan Lawlor <blawlor@clamsnet.org> --- This same bug actually affects more than just the suggestions table. The browser's local storage keeps some data about the table pagination, filtering and ordering and it's possible for that data got into a weird state when you move from the second page of a record with many results to the first page of a different record that only has a few results. To recreate on a bib record's holds tab: - Go to a record with more than 20 holds - Click on the left panel Holds (34) - Click Next > to go to the second page of holds - Now go to a record with a few holds, but less than 20 - Click on the left panel Holds (3) - Table loads with 'no matching results found' - Pagination info says Showing 21 to 3 of 3 entries. Yikes! - Click <<First, the local storage data issue is resolved and the holds load correct In this case the table state saved in local storage in DataTables_circ_holds_patron_holds_table is not valid when you go to the record with only a few holds because start is set to 20 for the second page of results -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41133 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|CONFIRMED |RESOLVED --- Comment #2 from Brendan Lawlor <blawlor@clamsnet.org> --- This actually seems to have been resolved for 26.05 by bug 40816 Upgrade DataTables from 2.1.8 to 2.3.4 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org