Bug 7546 - Cannot view subscription detail - bareword error
Summary: Cannot view subscription detail - bareword error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: 3.8
Hardware: All All
: P1 - high blocker
Assignee: Paul Poulain
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks: 6875
  Show dependency treegraph
 
Reported: 2012-02-15 20:13 UTC by Liz Rea
Modified: 2019-06-27 09:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 7546 - cannot view subscription detail (818 bytes, patch)
2012-02-15 20:16 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 7546 - cannot view subscription detail (894 bytes, patch)
2012-02-15 20:30 UTC, Liz Rea
Details | Diff | Splinter Review
Proposed Patch (2.76 KB, patch)
2012-02-16 11:08 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 7546 - cannot view subscription detail (909 bytes, patch)
2012-02-16 17:08 UTC, Paul Poulain
Details | Diff | Splinter Review
bug 7546 follow-up, enabled_staff_search_views problem (2.04 KB, patch)
2012-02-16 17:08 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 7546 Do not call routine as bareword (2.81 KB, patch)
2012-02-16 17:09 UTC, Paul Poulain
Details | Diff | Splinter Review
bug 7546 follow-up, enabled_staff_search_views problem (1.42 KB, patch)
2012-02-16 17:36 UTC, Paul Poulain
Details | Diff | Splinter Review
[Signed Off] Bug 7546 - cannot view subscription detail (4.49 KB, patch)
2012-02-16 18:34 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2012-02-15 20:13:18 UTC
Bareword "C4::Search::enabled_staff_search_views" not allowed while "strict subs" in use at /home/wizzyrea/kohaclone/serials/subscription-detail.pl line 146.
Execution of /home/wizzyrea/kohaclone/serials/subscription-detail.pl aborted due to compilation errors.
Comment 1 Liz Rea 2012-02-15 20:16:21 UTC Comment hidden (obsolete)
Comment 2 Liz Rea 2012-02-15 20:17:01 UTC
i should say it adds it where it was missing, in subscription-detail.pl.
Comment 3 Liz Rea 2012-02-15 20:30:34 UTC Comment hidden (obsolete)
Comment 4 Colin Campbell 2012-02-16 10:58:47 UTC
Problem also serials-edit.pl. adding use C4::Search also adds a compile time error as the routine is not exported.
Part of the problem is that the routine is called as a bareword lets call it properly. patch for both to follow
Comment 5 Colin Campbell 2012-02-16 11:08:47 UTC Comment hidden (obsolete)
Comment 6 Paul Poulain 2012-02-16 17:08:42 UTC Comment hidden (obsolete)
Comment 7 Paul Poulain 2012-02-16 17:08:55 UTC Comment hidden (obsolete)
Comment 8 Paul Poulain 2012-02-16 17:09:38 UTC Comment hidden (obsolete)
Comment 9 Paul Poulain 2012-02-16 17:12:03 UTC
The 2 first patches are signed-off & you can consider them as QAed as they are tiny.

Please sign-off mine (http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7698&action=diff) , that fixes some remaining problems i've found, and i'll push everything quickly !
Comment 10 Paul Poulain 2012-02-16 17:36:10 UTC Comment hidden (obsolete)
Comment 11 Paul Poulain 2012-02-16 17:37:31 UTC
Just seen & pushed the 7545, that solves the additem problem.

I also understood why the problem has appeared (see bug 7545 : removing use C4::Search in C4::Heading was the cause)
Comment 12 Liz Rea 2012-02-16 18:02:36 UTC
This patch caused some failed tests in serials (but it may be my data? will double check that):

#   Failed test 'test getting last or missing issues'
#   at t/db_dependent/Serials.t line 86.
#          got: '2'
#     expected: '0'

#   Failed test 'test getting late issues'
#   at t/db_dependent/Serials.t line 44.
#          got: '2'
#     expected: '0'
Comment 13 Paul Poulain 2012-02-16 18:07:07 UTC
(In reply to comment #12)
> This patch caused some failed tests in serials (but it may be my data? will
> double check that):
it's probably the case, because they are really not related to this part of Koha.
Comment 14 Liz Rea 2012-02-16 18:34:16 UTC
Created attachment 7703 [details] [review]
[Signed Off] Bug 7546 - cannot view subscription detail

This patch adds a C4::Search to subscription-detail.pl to compensate for a removed
one from auth.pm during the denesting effort.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Bug 7546 Do not call routine as bareword

Fixes compilation errors due to calling routine without parens
Also nothing was gained (and obfuscation added) by forcing
the return into a hash ref have changed variable to hash
tidied up the if else chain

These routines should be refactored out future

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

bug 7546 follow-up, enabled_staff_search_views problem

* enabled_staff_search_views was not exported by C4::Search, should have been
* serials/serials-edit.pl were also missing it

Comments:
* checked with for file in */*.pl; do perl -wc $file; done that no script was still having this problem

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Final sign off for all 3 patches
Note: I had some problems with tests, but it is probably related to my data and not this patch.
Comment 15 Paul Poulain 2012-02-17 08:08:47 UTC
Considering that this patch is a follow-up for bug 6875, i've pushed it in branch new/bug_6875