Bug 26165

Summary: Duplicating large saved report leads to error due to length of URI
Product: Koha Reporter: Henry Bolshaw <bolshawh>
Component: ReportsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, jonathan.druart, lucas, marjorie.barry-vila, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09
Attachments: Bug 26165: Fix duplication of large saved reports
Bug 26165: Fix duplication of large saved reports
Bug 26165: Fix duplication of large saved reports

Description Henry Bolshaw 2020-08-06 16:01:40 UTC
If the combined character length of a saved report's title, notes and SQL is too long then pressing the 'duplicate' button will lead to an error:

"Request-URI Too Long

The requested URL's length exceeds the capacity limit for this server."

This seems to be happening after the URL reaches 8226 characters.

I originally encountered this error when duplicating a long SQL report but I think the easiest way to replicate it is to add a lot of text to the notes field:

1. Create a simple SQL report and add a lot of text into the notes field (the combined URL lenth must be >8225 characters)
2. Save the report
3. Press the duplicate the report from the saved reports page (guided_reports.pl?phase=Use%20save)


As a workaround for this bug, users can copy and paste the SQL into a new report and save it that way or write shorter reports.
Comment 1 Jonathan Druart 2020-08-07 10:46:10 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-08-07 17:29:48 UTC
Created attachment 107970 [details] [review]
Bug 26165: Fix duplication of large saved reports

If the combined character length of a saved report's
title, notes and SQL is too long then pressing the
'duplicate' button will lead to an error:

"Request-URI Too Long
The requested URL's length exceeds the capacity limit
for this server."

Test plan:
1. Create a simple SQL report and add a lot of text
   into the notes field (the combined URL lenth must be
   >8225 characters)
2. Save the report
3. Press the duplicate the report from the saved reports page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2020-08-10 17:29:08 UTC
Created attachment 108011 [details] [review]
Bug 26165: Fix duplication of large saved reports

If the combined character length of a saved report's
title, notes and SQL is too long then pressing the
'duplicate' button will lead to an error:

"Request-URI Too Long
The requested URL's length exceeds the capacity limit
for this server."

Test plan:
1. Create a simple SQL report and add a lot of text
   into the notes field (the combined URL lenth must be
   >8225 characters)
2. Save the report
3. Press the duplicate the report from the saved reports page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2020-08-13 05:58:07 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-08-17 14:47:03 UTC
backported to 20.05.x for 20.05.03
Comment 6 Aleisha Amohia 2020-08-18 02:02:23 UTC
backported to 19.11.x for 19.11.09
Comment 7 Victor Grousset/tuxayo 2020-09-20 14:52:49 UTC
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.