Bugzilla – Attachment 97146 Details for
Bug 24313
XSLT errors should show in the logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24313: Always display XSLT errors in logs
Bug-24313-Always-display-XSLT-errors-in-logs.patch (text/plain), 1.55 KB, created by
Marcel de Rooy
on 2020-01-10 07:04:35 UTC
(
hide
)
Description:
Bug 24313: Always display XSLT errors in logs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-10 07:04:35 UTC
Size:
1.55 KB
patch
obsolete
>From 92f5d27cc053d6c364efa6d2eaa0eaf3519fe81b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 27 Dec 2019 14:55:36 +0100 >Subject: [PATCH] Bug 24313: Always display XSLT errors in logs >Content-Type: text/plain; charset=utf-8 > >From > commit 295ae33800a322facfdf56795f4c02b2fd53432b > Bug 20272: Replace error numbers by codes in XSLT_Handler > >""" > Make XSLT_Handler a little bit less noisy by defaulting print_warns to > false unless $ENV{DEBUG} is set. (See also bug 19018). >""" > >I think we should warn the errors in the logs. They are not debug messages here, we should not rely on DEBUG. >If too noisy we should fix the original issues, not hide all the errors (which make the XSLT debugging super hard) > >Test plan: >Break a XSLT, reload the page and confirm that there are useful errors in the Koha log file > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/XSLT_Handler.pm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/Koha/XSLT_Handler.pm b/Koha/XSLT_Handler.pm >index 0682c3ca20..5b0726fddf 100644 >--- a/Koha/XSLT_Handler.pm >+++ b/Koha/XSLT_Handler.pm >@@ -264,9 +264,7 @@ sub _init { > > $self->_set_error; > $self->{xslt_hash} = {}; >- $self->{print_warns} = exists $self->{print_warns} >- ? $self->{print_warns} >- : $ENV{DEBUG} // 0; >+ $self->{print_warns} = 1 unless exists $self->{print_warns}; > $self->{do_not_return_source} = 0 > unless exists $self->{do_not_return_source}; > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24313
:
96650
|
96654
| 97146