[Bug 12522] New: Fatal database error when viewing Holds for Bib with no Items
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Bug ID: 12522 Summary: Fatal database error when viewing Holds for Bib with no Items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Currently, if you have the environmental variable set (via "SetEnv DEBUG 1"), you can trigger a fatal database error in the staff client by clicking "Holds" on a bib record if it has no items attached. If you don't have DEBUG set, you'll get database error warning messages in your logs but it won't be enough to bring down Koha. I doubt many people are running in production with DEBUG turned on, and I doubt that many people try to view the Holds tab on a bib record that doesn't have any items. That said, it's a good idea to reduce errors and warnings... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 29464 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29464&action=edit Bug 12522 - Fatal database error when viewing Holds for Bib with no Items This patch fixes some potential SQL syntax errors, which can cause fatal software errors in Koha when the environmental variable DEBUG is on. _TEST PLAN_ Before applying: 0) Ensure that you don't have "SetEnv DEBUG 1" in your Apache config 1) Create a new bib record 2) Click on the "Holds" tab before creating any items 3) Note the message "Cannot place hold: this record has no items attached." 4) Add "SetEnv DEBUG 1" to your Apache config 5) Restart Apache 6) Refresh your page 7) Note the following Software Error: "DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3 at /koha/lib/C4/Koha.pm line 835. 8) Apply the patch 9) Refresh your page 10) Note the message from Step 3 Thorough tester: 11) Remove "SetEnv DEBUG 1" from your Apache config, restart Apache, and refresh your page. You should see the message from Step 3. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #2 from David Cook <dcook@prosentient.com.au> --- I suppose I should note that "Koha::get_infos_of" should probably be removed, and "C4::Items::GetItemInfosOf", and "C4::Biblio::GetBiblioItemInfosOf" should be refactored. (I should have probably included some explanatory comments in my patch as well, but...oh well.) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kolpen@o2.pl --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 8466 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29464|0 |1 is obsolete| | --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 29590 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29590&action=edit [SIGNED-OFF] Bug 12522 - Fatal database error when viewing Holds for Bib with no Items This patch fixes some potential SQL syntax errors, which can cause fatal software errors in Koha when the environmental variable DEBUG is on. _TEST PLAN_ Before applying: 0) Ensure that you don't have "SetEnv DEBUG 1" in your Apache config 1) Create a new bib record 2) Click on the "Holds" tab before creating any items 3) Note the message "Cannot place hold: this record has no items attached." 4) Add "SetEnv DEBUG 1" to your Apache config 5) Restart Apache 6) Refresh your page 7) Note the following Software Error: "DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3 at /koha/lib/C4/Koha.pm line 835. 8) Apply the patch 9) Refresh your page 10) Note the message from Step 3 Thorough tester: 11) Remove "SetEnv DEBUG 1" from your Apache config, restart Apache, and refresh your page. You should see the message from Step 3. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Error reproduced, patch fixes it. Tested following test plan, no koha-qa errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29590|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29632 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29632&action=edit [PASSED QA] Bug 12522 - Fatal database error when viewing Holds for Bib with no Items This patch fixes some potential SQL syntax errors, which can cause fatal software errors in Koha when the environmental variable DEBUG is on. _TEST PLAN_ Before applying: 0) Ensure that you don't have "SetEnv DEBUG 1" in your Apache config 1) Create a new bib record 2) Click on the "Holds" tab before creating any items 3) Note the message "Cannot place hold: this record has no items attached." 4) Add "SetEnv DEBUG 1" to your Apache config 5) Restart Apache 6) Refresh your page 7) Note the following Software Error: "DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3 at /koha/lib/C4/Koha.pm line 835. 8) Apply the patch 9) Refresh your page 10) Note the message from Step 3 Thorough tester: 11) Remove "SetEnv DEBUG 1" from your Apache config, restart Apache, and refresh your page. You should see the message from Step 3. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Error reproduced, patch fixes it. Tested following test plan, no koha-qa errors. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12522 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks David! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org