Bug 29669 - Uninitialized value warnings when XSLTParse4Display is called
Summary: Uninitialized value warnings when XSLTParse4Display is called
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Peter Vashchuk
QA Contact: Marcel de Rooy
URL:
Keywords: rel_21_11_candidate
Depends on: 12561
Blocks: 25790
  Show dependency treegraph
 
Reported: 2021-12-09 13:46 UTC by Peter Vashchuk
Modified: 2021-12-17 21:20 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.01


Attachments
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called (2.73 KB, patch)
2021-12-09 13:48 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called (3.01 KB, patch)
2021-12-15 07:56 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called (3.09 KB, patch)
2021-12-15 08:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called (3.18 KB, patch)
2021-12-15 13:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Vashchuk 2021-12-09 13:46:30 UTC

    
Comment 1 Peter Vashchuk 2021-12-09 13:48:40 UTC
Created attachment 128373 [details] [review]
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called

Wrong key 'xsl_filename' is present in opac-tags.pl and shelves.pl
(the only places where it is used in the code even) instead of
'xsl_syspref' that is actually used and this is the cause of those
warnings.

Also added honeypot to check if other calls in same way happens.
Honeypot probably not needed, review when QA in the Community.

To reproduce:
1) Prepare some test list with items or use existing one.
2) Go to the lists page (koha/virtualshelves/shelves.pl),
notice multitude of new warnings in the "intranet-error.log" log file
that mostly have to do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Go back to same page and check it again, warns like that should not
appear in the log file anymore.
Comment 2 Andrew Nugged 2021-12-10 21:47:02 UTC
Please provide second reproduction scheme, for opac-tags.pl
Comment 3 Marcel de Rooy 2021-12-13 13:42:31 UTC
Please correct English:

+    die "Mandatory \$params->{xsl_syspref} does not provided, called with biblionumber $params->{biblionumber}"
Comment 4 Peter Vashchuk 2021-12-15 07:56:23 UTC
Created attachment 128544 [details] [review]
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called

Wrong key 'xsl_filename' is present in opac-tags.pl and shelves.pl
(the only places where it is used in the code even) instead of
'xsl_syspref' that is actually used and this is the cause of those
warnings.

Also added honeypot to check if other calls in same way happens.
Honeypot probably not needed, review when QA in the Community.

To reproduce (shelves.pl):
1) Prepare some test list with items or use existing one.
2) Go to the lists page (koha/virtualshelves/shelves.pl),
notice multitude of new warnings in the "intranet-error.log" log file
that mostly have to do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Go back to same page and check it again, warns like that should not
appear in the log file anymore.

To reproduce (opac-tags.pl):
1) Go to the "my tags" page in OPAC and open "tag cloud".
2) Notice a bunch of new warnings in the log file that mostly have to
do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Reload the page and check the log file again.
Comment 5 Jonathan Druart 2021-12-15 08:12:31 UTC
Created attachment 128545 [details] [review]
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called

Wrong key 'xsl_filename' is present in opac-tags.pl and shelves.pl
(the only places where it is used in the code even) instead of
'xsl_syspref' that is actually used and this is the cause of those
warnings.

Also added honeypot to check if other calls in same way happens.
Honeypot probably not needed, review when QA in the Community.

To reproduce (shelves.pl):
1) Prepare some test list with items or use existing one.
2) Go to the lists page (koha/virtualshelves/shelves.pl),
notice multitude of new warnings in the "intranet-error.log" log file
that mostly have to do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Go back to same page and check it again, warns like that should not
appear in the log file anymore.

To reproduce (opac-tags.pl):
1) Go to the "my tags" page in OPAC and open "tag cloud".
2) Notice a bunch of new warnings in the log file that mostly have to
do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Reload the page and check the log file again.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Marcel de Rooy 2021-12-15 13:08:40 UTC
Created attachment 128566 [details] [review]
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called

Wrong key 'xsl_filename' is present in opac-tags.pl and shelves.pl
(the only places where it is used in the code even) instead of
'xsl_syspref' that is actually used and this is the cause of those
warnings.

Also added honeypot to check if other calls in same way happens.
Honeypot probably not needed, review when QA in the Community.

To reproduce (shelves.pl):
1) Prepare some test list with items or use existing one.
2) Go to the lists page (koha/virtualshelves/shelves.pl),
notice multitude of new warnings in the "intranet-error.log" log file
that mostly have to do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Go back to same page and check it again, warns like that should not
appear in the log file anymore.

To reproduce (opac-tags.pl):
1) Go to the "my tags" page in OPAC and open "tag cloud".
2) Notice a bunch of new warnings in the log file that mostly have to
do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Reload the page and check the log file again.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Fridolin Somers 2021-12-16 22:13:34 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2021-12-17 14:57:58 UTC
Pushed to 21.11.x for 21.11.01
Comment 9 Andrew Fuerste-Henry 2021-12-17 21:20:59 UTC
Missing dependency, not backported to 21.05