Bug 39409

Summary: Duplicate modifybiblio ids in cataloguing toolbar
Product: Koha Reporter: Phil Ringnalda <phil>
Component: TemplatesAssignee: Phil Ringnalda <phil>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 34478    
Bug Blocks:    
Attachments: Bug 39409: Duplicate modifybiblio ids in cat-toolbar
Bug 39409: Duplicate modifybiblio ids in cat-toolbar

Description Phil Ringnalda 2025-03-21 14:05:08 UTC
When https://git.koha-community.org/Koha-community/Koha/commit/74d7ae7672a4b82568e57eaddefbded4bf5b05e6 added forms for batch modify and batch delete items so they would work with CSRF protection, it clearly did so by copy-pasting the form from Modify record using template, since all three have id="modifybiblio". Luckily, the copies have their own id attribute first, so the duplicate ones are dropped by parsers since an element can't have two ids, but having duplicates is confusing.
Comment 1 Phil Ringnalda 2025-03-21 14:22:17 UTC
Created attachment 179616 [details] [review]
Bug 39409: Duplicate modifybiblio ids in cat-toolbar

The biblio details page Edit menu has three different elements which all
have id="modifybibilio", two of which also have another id. Neither of those
things is allowed.

Test plan:
1. Without the patch, load the details view for any biblio record and View
   source
2. Search for id="modifybiblio"
3. You will get three results, the second and third shown with id in red
4. Apply patch, reload the page, View source and search again
5. You will get one result, without any red

Sponsored-by: Chetco Community Public Library
Comment 2 Jonathan Druart 2025-03-24 10:06:08 UTC
Created attachment 179637 [details] [review]
Bug 39409: Duplicate modifybiblio ids in cat-toolbar

The biblio details page Edit menu has three different elements which all
have id="modifybibilio", two of which also have another id. Neither of those
things is allowed.

Test plan:
1. Without the patch, load the details view for any biblio record and View
   source
2. Search for id="modifybiblio"
3. You will get three results, the second and third shown with id in red
4. Apply patch, reload the page, View source and search again
5. You will get one result, without any red

Sponsored-by: Chetco Community Public Library

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2025-03-24 10:06:32 UTC
Trivial, skipping QA.
Comment 4 Katrin Fischer 2025-04-11 07:56:27 UTC
Pushed for 25.05!

Well done everyone, thank you!