[Bug 36272] New: Exporting too many items from item search to barcode file gives "Request-URI Too Long"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Bug ID: 36272 Summary: Exporting too many items from item search to barcode file gives "Request-URI Too Long" Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org To reproduce in KTD: - Login to the staff client - Go to "Item search" - Click on "Search" without adding any limitations - Change to "Show [All] entries" - this should show about 961 items - Click on "Select visible rows" - Click on "Export selected results (961) to" and choose "Barcode file" - This should result in this error: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server. The URL of the page that shows the error looks like this: http://localhost:8081/cgi-bin/koha/catalogue/item-export.pl?format=barcodes&itemnumber=513&itemnumber=514&itemnumber=515&itemnumber=574&itemnumber=124&itemnumber=125&itemnumber=126& etc etc The solution is probably to do a POST, not a GET? Similar to bug 32278, but in a different area. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32278 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Exporting too many items |Exporting too many items |from item search to barcode |from item search gives |file gives "Request-URI Too |"Request-URI Too Long" |Long" | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (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... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- And then yeah there's that scale problem mentioned in bug 32278... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27859 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36272 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- There are instances of cud-export and cud-form, which makes sense to me to use in cases like this for scalability. I came across this in bug 27248 and decided for cud-form because it uses the post data to fill the form in the template. Maybe this needs to be officially agreed on and then added to the coding guidelines under the CRSF section or somewhere else for clarification. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org