| Summary: | Reports with too many params can exceed length limit of URI | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
| Component: | Reports | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | bdaeuber, rcoert, wizzyrea |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
This same thing also happens with batch modification from the detail page - our example was someone trying to modify more than 400 items from the detail page. |
Our reports submit the form as a GET request - this is useful for saving links to report results, however, when using the <<Param|list>> feature, too much data can be submitted to the form and cause a 414 error: Request-URI Too Long The requested URL's length exceeds the capacity limit for this server. Apache/2.4.53 (Debian) Server at kohadev-intra.myDNSname.org Port 80 We should, optionally, submit large requests as 'POST' Dirty sample code: $("#rep_guided_reports_start textarea[id^='sql_params']").change(function(){ console.log('Garsh'); let param_length = 0; $("textarea[id^='sql_params']").each(function(index,value){ param_length += $(this).val().length; }); if( param_length > 900 ){ $("#rep_guided_reports_start form").attr('method','post'); $("#rep_guided_reports_start form input[type='submit']").after('<p>Too much params! Wil submit as post!</p>'); } });