[Bug 10217] New: Make sure direct links to detail views work when there is no session
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Bug ID: 10217 Summary: Make sure direct links to detail views work when there is no session Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: critical Priority: P5 - low Component: OPAC Assignee: magnus@enger.priv.no Reporter: magnus@enger.priv.no On current master, if you do not have a session and try to visit a detail view page you will get an error: Can't use an undefined value as a HASH reference at /home/magnus/scripts/kohadev/opac/opac-detail.pl line 445. The offending line looks like this: my $branch = C4::Context->userenv->{branch}; This will typically happen if you follow a direct link to a detail view in an OPAC you have not visited before, or not visited in such a long time that the session expired. If you get the error, visit the front page and go back to the detail view that gave the error it will work, because visiting the front page establishes a new session: <rangi> you dont have a userenv <rangi> if you arent logged in <magnuse> that makes sense :-) <magnuse> but... do you get one by visiting the front page, then? <rangi> yep <rangi> starts an anonymous session <magnuse> and that only happens on the front page? <rangi> or search results <rangi> doesnt happen on detail page <rangi> and it shouldnt <rangi> cos else google would spawn a zillion sessions Huge thanks to Chris C. who suggested the fix for this, but did not want to submit a patch for it. :-) The problem was caused by Bug 7740. There was a similar problem in opac-serach.pl, fixed on Bug 9980. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9980 Blocks| |8198 Depends on| |7740 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 --- Comment #1 from Magnus Enger <magnus@enger.priv.no> --- Created attachment 18017 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18017&action=edit Bug 10217 - Make sure direct links to detail views work when there is no session To reproduce: - Make sure you do not have a session for the OPAC you will be testing with. Delete the CGISESSID session cookie if you have one. - Go directly to a detail view, e.g.: /cgi-bin/koha/opac-detail.pl?biblionumber=1 - Observe the error "Can't use an undefined value as a HASH reference at /home/magnus/scripts/kohadev/opac/opac-detail.pl line 445." To test: - Apply the patch - Reload the page with the error - You should now see the detail view of the record, as usual Thanks to Chris Cormack who suggested the fix for this! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 18037 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18037&action=edit [SIGNED-OFF] Bug 10217 - Make sure direct links to detail views work when there is no session To reproduce: - Make sure you do not have a session for the OPAC you will be testing with. Delete the CGISESSID session cookie if you have one. - Go directly to a detail view, e.g.: /cgi-bin/koha/opac-detail.pl?biblionumber=1 - Observe the error "Can't use an undefined value as a HASH reference at /home/magnus/scripts/kohadev/opac/opac-detail.pl line 445." To test: - Apply the patch - Reload the page with the error - You should now see the detail view of the record, as usual Thanks to Chris Cormack who suggested the fix for this! Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18017|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18037|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 18085 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18085&action=edit [PASSED QA] Bug 10217 - Make sure direct links to detail views work when there is no session To reproduce: - Make sure you do not have a session for the OPAC you will be testing with. Delete the CGISESSID session cookie if you have one. - Go directly to a detail view, e.g.: /cgi-bin/koha/opac-detail.pl?biblionumber=1 - Observe the error "Can't use an undefined value as a HASH reference at /home/magnus/scripts/kohadev/opac/opac-detail.pl line 445." To test: - Apply the patch - Reload the page with the error - You should now see the detail view of the record, as usual Thanks to Chris Cormack who suggested the fix for this! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested according to test plan, confirmed patch fixes the problem. All tests and QA script pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- *** Bug 10175 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10217 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Not needed for 3.10.x or below -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org