[Bug 28804] New: 500 Error when running report with bad syntax
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Bug ID: 28804 Summary: 500 Error when running report with bad syntax Change sponsored?: --- Product: Koha Version: 21.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: jstallings@tsas.org QA Contact: testopia@bugs.koha-community.org In previous versions, running an SQL report with an error (typo, bad syntax) would yield an error page with the problem syntax highlighted. 21.05 returns only a 500 error. Excerpt from plack-intranet-error.log here: https://pastebin.com/0UCYkU46 -- 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=28804 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |jonathan.druart+koha@gmail. | |com Keywords| |rel_21_05_candidate Version|21.05 |unspecified Severity|normal |major Depends on| |25026 Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Certainly caused by bug 25026. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25026 [Bug 25026] RaiseError must be set for the UI -- 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=28804 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 123446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123446&action=edit Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123446|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 123461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123461&action=edit Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123461|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 123686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123686&action=edit Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.03 released in| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 25026 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28804 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |didier.gautheron@biblibre.c | |om --- Comment #8 from Didier Gautheron <didier.gautheron@biblibre.com> --- *** Bug 28287 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org