Summary: | Exporting too many items from item search gives "Request-URI Too Long" | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | Searching | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, dcook, lisette, lucas, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32278 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27859 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Magnus Enger
2024-03-07 12:41:37 UTC
Relevant code in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt: $("body").on("click", "#barcodesExportLink", function(e){ e.preventDefault(); exportItems('barcodes'); }); function exportItems(format) { let item_search_selections = JSON.parse( localStorage.getItem("item_search_selections") ) || []; if (item_search_selections.length > 0) { var href = '/cgi-bin/koha/catalogue/item-export.pl?format=' + format; href += '&itemnumber=' + Array.from( item_search_selections ).join('&itemnumber='); location = href; } else { $('#format-' + format).prop('checked', true); $('#itemsearchform').submit(); $('#format-html').prop('checked', true); } } Export to CSV has the same problem. (In reply to Magnus Enger from comment #0) > The solution is probably to do a POST, not a GET? In this case, I'd say that's probably the answer. A little while ago, when working on the CSRF stuff, I think there was a dogmatic decision to do all "read" actions as GET only, but obviously that's not practical in cases like this. (I mean alternatively a "batch" could be created in the database so that the GET could just take that batch ID but that has other logistical difficulties.) I don't know what the community wants to do about cases like this anymore... |