[Bug 20272] New: XSLT_Handler should use alphanumeric error codes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Bug ID: 20272 Summary: XSLT_Handler should use alphanumeric error codes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Currently, the code uses error numbers 1 to 7. The method errstr is not widely used. In order to translate error message, we could use a template. -- 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=20272 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Patch complexity|--- |Small patch -- 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=20272 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- *** Bug 19018 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=20272 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 72205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72205&action=edit Bug 20272: Replace error numbers by codes in XSLT_Handler We remove the error numbers 1 to 7 by readable codes. And remove the errstr attribute (not used widely). Make XSLT_Handler a little bit less noisy by defaulting print_warns to false unless $ENV{DEBUG} is set. (See also bug 19018). The unit has been changed accordingly. (A few warnings are no longer tested.) Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 72206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72206&action=edit Bug 20272: Changes for Breeding.pm and Record.pm In Breeding.pm we let Z3950Search return the xslt handler error codes back to the template. They are converted to text messages by using an new include file (added for opac and intranet now). The generic xslt_err code is now obsoleted. In Record.pm the errstr call is removed. The croak is done with the new error code in err. This seems sufficient. Test plan: [1] Run Breeding.t [2] Run Record.t [3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that target and check if you see a error 'XSLT file not found'. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72205|0 |1 is obsolete| | --- Comment #4 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 72916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72916&action=edit Bug 20272: Replace error numbers by codes in XSLT_Handler We remove the error numbers 1 to 7 by readable codes. And remove the errstr attribute (not used widely). Make XSLT_Handler a little bit less noisy by defaulting print_warns to false unless $ENV{DEBUG} is set. (See also bug 19018). The unit has been changed accordingly. (A few warnings are no longer tested.) Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72206|0 |1 is obsolete| | --- Comment #5 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 72917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72917&action=edit Bug 20272: Changes for Breeding.pm and Record.pm In Breeding.pm we let Z3950Search return the xslt handler error codes back to the template. They are converted to text messages by using an new include file (added for opac and intranet now). The generic xslt_err code is now obsoleted. In Record.pm the errstr call is removed. The croak is done with the new error code in err. This seems sufficient. Test plan: [1] Run Breeding.t [2] Run Record.t [3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that target and check if you see a error 'XSLT file not found'. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72916|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 75582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75582&action=edit Bug 20272: Replace error numbers by codes in XSLT_Handler We remove the error numbers 1 to 7 by readable codes. And remove the errstr attribute (not used widely). Make XSLT_Handler a little bit less noisy by defaulting print_warns to false unless $ENV{DEBUG} is set. (See also bug 19018). The unit has been changed accordingly. (A few warnings are no longer tested.) Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Chris Cormack <chris@bigballofwax.co.nz> 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=20272 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72917|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 75583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75583&action=edit Bug 20272: Changes for Breeding.pm and Record.pm In Breeding.pm we let Z3950Search return the xslt handler error codes back to the template. They are converted to text messages by using an new include file (added for opac and intranet now). The generic xslt_err code is now obsoleted. In Record.pm the errstr call is removed. The croak is done with the new error code in err. This seems sufficient. Test plan: [1] Run Breeding.t [2] Run Record.t [3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that target and check if you see a error 'XSLT file not found'. The bonus is these error messages are now translatable as they are in the templates Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |RESOLVED --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement, not back porting to 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20272 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24313 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24313 [Bug 24313] XSLT errors should show in the logs -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org