[Bug 20763] New: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Bug ID: 20763 Summary: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75302 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75302&action=edit Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error". Test Plan: 1) Enable AllowPurchaseSuggestionBranchChoice 2) Enable AnonSuggestions 3) In the OPAC, perform a search that will have no results, click the "Make a purchase suggestion" link. 4) Note the error 5) Apply this patch 6) Reload the page 7) The page should load now! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 pierre-luc.lapointe@inLibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75302|0 |1 is obsolete| | --- Comment #2 from pierre-luc.lapointe@inLibro.com --- Created attachment 75567 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75567&action=edit Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error". Test Plan: 1) Enable AllowPurchaseSuggestionBranchChoice 2) Enable AnonSuggestions 3) In the OPAC, perform a search that will have no results, click the "Make a purchase suggestion" link. 4) Note the error 5) Apply this patch 6) Reload the page 7) The page should load now! Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Pierre-Luc Lapointe <pierre-luc.lapointe@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |pierre-luc.lapointe@inLibro | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17829 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|normal |major --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- One more caused by commit 2b90ea2cb0e5e976de7ddef0151ae83d8ac578e6 Bug 17829: Move GetMember to Koha::Patron Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17829 [Bug 17829] Move GetMember to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75567|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 75602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75602&action=edit Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error". Test Plan: 1) Enable AllowPurchaseSuggestionBranchChoice 2) Enable AnonSuggestions 3) In the OPAC, perform a search that will have no results, click the "Make a purchase suggestion" link. 4) Note the error 5) Apply this patch 6) Reload the page 7) The page should load now! Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> 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=20763 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 75603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75603&action=edit Bug 20763: Remove unecessary Koha::Patron fetch If $borrowernumber is not set, there is no userenv. So let's pick the library code set in the userenv instead of fetching the Koha::Patron->branchcode from DB 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=20763 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Kyle, I think the conditions can be simplified. Can you confirm I am not missing something with this follow-up? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75603|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75623&action=edit Bug 20763: Remove unecessary Koha::Patron fetch If $borrowernumber is not set, there is no userenv. So let's pick the library code set in the userenv instead of fetching the Koha::Patron->branchcode from DB Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #7)
Created attachment 75623 [details] [review] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to master for 18.11, awesome work everybody! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This patch has been pushed to 18.05.x and will be in 18.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20763 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 17829 not in 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org