Bug 38293

Summary: Cannot add Specific OPAC JS or CSS
Product: Koha Reporter: David Cook <dcook>
Component: System AdministrationAssignee: David Cook <dcook>
Status: RESOLVED FIXED QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: normal    
Priority: P5 - low CC: david, emily.lamancusa, gmcharlt, lucas, martin.renvoize, matt.blenkinsop, oleonard
Version: MainKeywords: regression
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes adding Specific OPAC JS and Specific OPAC CSS for libraries - you can now add or edit these settings. (This is related to the OPAC and staff interface Bootstrap 5 upgrade in Koha 24.11.)
Version(s) released in:
24.11.00
Circulation function:
Bug Depends on: 35402    
Bug Blocks:    
Attachments: Bug 38293: Fix setting branch-level JS and CSS
Bug 38293: (alternate) Fix setting branch-level JS and CSS
Bug 38293: (alternate) Fix setting branch-level JS and CSS
Bug 38293: (alternate) Fix setting branch-level JS and CSS
Bug 38293: (alternate) Fix setting branch-level JS and CSS

Description David Cook 2024-10-29 22:58:36 UTC
I just noticed in ktd that trying to add Specific OPAC JS or Specific OPAC CSS won't work and causes a Javascript error to appear in the console
Comment 1 David Cook 2024-10-29 23:09:46 UTC
Created attachment 173697 [details] [review]
Bug 38293: Fix setting branch-level JS and CSS

Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/branches.pl?
op=add_form&branchcode=CPL
3. Scroll to bottom of the page and click "Edit" then "Collapse" next to
Specific OPAC JS and Specific OPAC CSS
Comment 2 David Cook 2024-10-29 23:11:37 UTC
Created attachment 173698 [details] [review]
Bug 38293: (alternate) Fix setting branch-level JS and CSS

Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/branches.pl?
op=add_form&branchcode=CPL
3. Scroll to bottom of the page and click "Edit" then "Collapse" next to
Specific OPAC JS and Specific OPAC CSS
Comment 3 David Cook 2024-10-29 23:12:46 UTC
I've got 2 possible fixes here, and copying in Owen as I'm not 100% sure what the right one is.

I think the right one is probably the "alternate", or maybe a variation on the alternate.

Basically, I don't think Bootstrap is involved with these textareas, so I think it was probably just updated by accident. But maybe we should change the attribute from "target" to something else, so it doesn't get confused with a Bootstrap control.
Comment 4 Owen Leonard 2024-10-30 10:32:09 UTC
Created attachment 173707 [details] [review]
Bug 38293: (alternate) Fix setting branch-level JS and CSS

Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=CPL
3. Scroll to bottom of the page and click "Edit" then "Collapse" next
   to Specific OPAC JS and Specific OPAC CSS

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2024-10-30 10:33:08 UTC
(In reply to David Cook from comment #3)
> Basically, I don't think Bootstrap is involved with these textareas, so I
> think it was probably just updated by accident.

This is correct. Thanks for finding it!
Comment 6 David Nind 2024-10-30 16:31:23 UTC
Created attachment 173726 [details] [review]
Bug 38293: (alternate) Fix setting branch-level JS and CSS

Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=CPL
3. Scroll to bottom of the page and click "Edit" then "Collapse" next
   to Specific OPAC JS and Specific OPAC CSS

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Emily Lamancusa (emlam) 2024-10-30 18:49:45 UTC
Created attachment 173737 [details] [review]
Bug 38293: (alternate) Fix setting branch-level JS and CSS

Test plan:
1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=CPL
3. Scroll to bottom of the page and click "Edit" then "Collapse" next
   to Specific OPAC JS and Specific OPAC CSS

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 8 Katrin Fischer 2024-10-31 10:04:10 UTC
Pushed for 24.11!

Well done everyone, thank you!