[Bug 28600] New: Variable "$patron" is not available
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Bug ID: 28600 Summary: Variable "$patron" is not available Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: OPAC Assignee: tomascohen@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 18989 In the logs: Variable "$patron" is not available at /kohadevbox/koha/opac/opac-detail.pl line 282 Coming from commit 8de3d9a95f2f3a01b5ed309805d81c698ac8e550 Bug 18989: (QA follow-up) Make controllers use Koha::Biblio->hidden_in_opac - 'category' => $borcat + 'category' => ($patron) ? $patron->categorycode : q{} It's in a sub, and patron is declared outside. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18989 [Bug 18989] Allow displaying biblios with all items hidden by OpacHiddenItems -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Ha, $borcat (which I replaced with $patron) was defined as (our) -our $borcat= q{}; -if ( C4::Context->preference('OpacHiddenItemsExceptions') ) { - $borcat = $patron ? $patron->categorycode : q{}; -} I guess I overlooked it. Patch coming. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 122171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122171&action=edit Bug 28600: Resolve variable scope issue This patch fixes a scope issue. Originally, a variable declared as our $borcat was replaced by my $patron This patch makes the method not rely on global variables, but have a parameter for the patron, and thus things are clearer. To test: 1. Open the OPAC detail page for a record => FAIL: The logs show some errors about the $patron variable not available in the scope 2. Apply this patch 3. Repeat 1 => SUCCESS: No errors 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=28600 Jonathan Druart <jonathan.druart+koha@gmail.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=28600 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122171|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 122207 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122207&action=edit Bug 28600: Resolve variable scope issue This patch fixes a scope issue. Originally, a variable declared as our $borcat was replaced by my $patron This patch makes the method not rely on global variables, but have a parameter for the patron, and thus things are clearer. To test: 1. Open the OPAC detail page for a record => FAIL: The logs show some errors about the $patron variable not available in the scope 2. Apply this patch 3. Repeat 1 => SUCCESS: No errors 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=28600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122207|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122338&action=edit Bug 28600: Resolve variable scope issue This patch fixes a scope issue. Originally, a variable declared as our $borcat was replaced by my $patron This patch makes the method not rely on global variables, but have a parameter for the patron, and thus things are clearer. To test: 1. Open the OPAC detail page for a record => FAIL: The logs show some errors about the $patron variable not available in the scope 2. Apply this patch 3. Repeat 1 => SUCCESS: No errors 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=28600 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Version(s)|21.11.00 |21.11.00,21.05.01 released in| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #5)
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |RESOLVED --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 18989 not is 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28600 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org