Bug 37945 - Links for system preferences subsections don't work
Summary: Links for system preferences subsections don't work
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on: 35402
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-17 16:22 UTC by Caroline Cyr La Rose
Modified: 2024-10-11 10:27 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37945: Fix scroll on syspref page (1.12 KB, patch)
2024-10-09 13:58 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37945: Remove fixedHeader for sysprefs (887 bytes, patch)
2024-10-09 14:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37945: Remove fixedHeader for sysprefs (957 bytes, patch)
2024-10-09 16:59 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 37945: Remove fixedHeader for sysprefs (1014 bytes, patch)
2024-10-10 16:33 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-09-17 16:22:29 UTC
When clicking on subsections in the left-hand side menu in system preferences, the screen goes down a bit, but not to the section.

To recreate:
1. Go to Administration > System preferences
2. Click Circulation in the left menu (for example)
3. Click Holds policy in the left menu (for example)
   --> Screen goes down a couple of lines to Article requests (?)
Comment 1 Caroline Cyr La Rose 2024-10-03 14:03:57 UTC
If it helps, I'm using KTD with Chrome on Ubuntu 22.04
Comment 2 Heather 2024-10-03 16:06:15 UTC
I'm using Edge (because employer) and am not able to replicate this--it seems to be working for me on our 24.05.03 catalog and also on ByWater's 24.05.03 demo. So, maybe something broke after 24.05.03?
Comment 3 David Nind 2024-10-07 01:44:30 UTC
I've tested on main with Firefox, Chromium, and Google Chrome (all on Ubuntu 22.04) - can confirm Caroline's findings in the description.

Other things noted:

1. From system preference search results, the links to "View all XXX preferences" seems to work OK, but not when browsing (as per the bug description).

2. Everything works as expected in a demo 24.05.03, so definitely something added after this to main. Maybe Bug 35402 - Update the OPAC and staff interface to Bootstrap 5 (have linked in case it is related to that).
Comment 4 David Nind 2024-10-07 03:15:04 UTC
Can confirm that things were working as expected before the Bootstrap 5 update, but not after:

1. Checkout before the Bootstrap 5 patches: git checkout f44d2cccc7
2. Rebuild the CSS: yarn build
3. Restart everything: restart_all
4. Check that everything works as expected - see description
5. Checkout after the Bootstrap 5 patches: git checkout 764162cd6
6. Rebuild the CSS: yarn build
7. Restart everything: restart_all
8. Check that links are not working as expected - see description
Comment 5 Caroline Cyr La Rose 2024-10-08 15:35:41 UTC
Thanks for confirming David! I figured it was a BS5 bug (I thought it was too weird a bug to be something else), but hadn't done the in-depth research you did. Thanks!
Comment 6 Jonathan Druart 2024-10-09 13:32:42 UTC
It works if I remove:

js/pages/preferences.js

211 $("table.preferences").dataTable(
212     $.extend(true, {}, dataTablesDefaults, {
213         dom: "t",
214         columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
215         paging: false,
216     })
217 );
Comment 7 Jonathan Druart 2024-10-09 13:58:04 UTC
Created attachment 172572 [details] [review]
Bug 37945: Fix scroll on syspref page
Comment 8 Jonathan Druart 2024-10-09 13:58:17 UTC
I cannot investigate more right more, but this patch is fixing the problem. It seems good enough for now, not sure we need the other DT's defaults.
Comment 9 Jonathan Druart 2024-10-09 14:02:28 UTC
Created attachment 172573 [details] [review]
Bug 37945: Remove fixedHeader for sysprefs

It breaks the scroll when a subsection is clicked.
Comment 10 Jonathan Druart 2024-10-09 14:02:49 UTC
Ok found it, it's actually the fixedHeader.
Comment 11 Caroline Cyr La Rose 2024-10-09 16:59:48 UTC
Created attachment 172576 [details] [review]
Bug 37945: Remove fixedHeader for sysprefs

It breaks the scroll when a subsection is clicked.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 12 Caroline Cyr La Rose 2024-10-09 17:00:24 UTC
THANK YOU!!!
Comment 13 David Nind 2024-10-09 18:22:15 UTC
Thanks Jonathan and Caroline!
Comment 14 Lucas Gass (lukeg) 2024-10-10 16:33:14 UTC
Good solution, works perfectly.
Comment 15 Lucas Gass (lukeg) 2024-10-10 16:33:43 UTC
Created attachment 172666 [details] [review]
Bug 37945: Remove fixedHeader for sysprefs

It breaks the scroll when a subsection is clicked.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 16 Katrin Fischer 2024-10-11 10:27:43 UTC
Pushed for 24.11!

Well done everyone, thank you!