Summary: | Search term after deleting an authority shouldn't be URI encoded | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | MARC Authority data support | Assignee: | Phil Ringnalda <phil> |
Status: | RESOLVED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | normal | ||
Priority: | P3 | CC: | jonathan.druart, lucas, maxeinergl |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.05
|
|
Circulation function: | |||
Bug Depends on: | 34478 | ||
Bug Blocks: | |||
Attachments: |
Bug 38056: Search term after deleting an authority shouldn't be URI encoded
Bug 38056: Search term after deleting an authority shouldn't be URI encoded Bug 38056: Search term after deleting an authority shouldn't be URI encoded |
Description
Phil Ringnalda
2024-10-01 22:44:17 UTC
Created attachment 172292 [details] [review] Bug 38056: Search term after deleting an authority shouldn't be URI encoded Now that deleting an authority record uses a form, rather than building up a URL in JavaScript, using the filter | uri on the value (confusingly named value) which passes along the search terms to reload after deleting results in a bad search. It should instead use the filter | html. Test plan: 1. Without the patch, top menu - Authorities 2. The default search, Main heading ($a only), Authority type Default, Operator contains, Order by Heading A-Z will work fine. You need to a search which will return more than one of the same thing (not hard in ktd) - for MARC21 search for a professional 3. You should get five results. For one of them, Actions - Delete - Confirm that you meant to click it 4. You now have a%20professional in the search box, and search results for whatever ElasticSearch thinks a% means. It's certainly not professional - you can change that term to any random string and get the same results 5. Apply patch, top menu - Authorities 6. Repeat steps 2 and 3, but this time after deleting another result, you will get a professional without the %20 in the search box, and your results will be the remaining Addison-Wesley professional computing series authorities Sponsored-by: Chetco Community Public Library Created attachment 173009 [details] [review] Bug 38056: Search term after deleting an authority shouldn't be URI encoded Now that deleting an authority record uses a form, rather than building up a URL in JavaScript, using the filter | uri on the value (confusingly named value) which passes along the search terms to reload after deleting results in a bad search. It should instead use the filter | html. Test plan: 1. Without the patch, top menu - Authorities 2. The default search, Main heading ($a only), Authority type Default, Operator contains, Order by Heading A-Z will work fine. You need to a search which will return more than one of the same thing (not hard in ktd) - for MARC21 search for a professional 3. You should get five results. For one of them, Actions - Delete - Confirm that you meant to click it 4. You now have a%20professional in the search box, and search results for whatever ElasticSearch thinks a% means. It's certainly not professional - you can change that term to any random string and get the same results 5. Apply patch, top menu - Authorities 6. Repeat steps 2 and 3, but this time after deleting another result, you will get a professional without the %20 in the search box, and your results will be the remaining Addison-Wesley professional computing series authorities Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Created attachment 173017 [details] [review] Bug 38056: Search term after deleting an authority shouldn't be URI encoded Now that deleting an authority record uses a form, rather than building up a URL in JavaScript, using the filter | uri on the value (confusingly named value) which passes along the search terms to reload after deleting results in a bad search. It should instead use the filter | html. Test plan: 1. Without the patch, top menu - Authorities 2. The default search, Main heading ($a only), Authority type Default, Operator contains, Order by Heading A-Z will work fine. You need to a search which will return more than one of the same thing (not hard in ktd) - for MARC21 search for a professional 3. You should get five results. For one of them, Actions - Delete - Confirm that you meant to click it 4. You now have a%20professional in the search box, and search results for whatever ElasticSearch thinks a% means. It's certainly not professional - you can change that term to any random string and get the same results 5. Apply patch, top menu - Authorities 6. Repeat steps 2 and 3, but this time after deleting another result, you will get a professional without the %20 in the search box, and your results will be the remaining Addison-Wesley professional computing series authorities Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.05 Depends on CSRF not in 23.11, and we for sure never documented what it fixed. |