[Bug 12702] New: Suggestions still accessible in OPAC when deactivated
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Bug ID: 12702 Summary: Suggestions still accessible in OPAC when deactivated Change sponsored?: --- Product: Koha Version: master Hardware: All URL: /cgi-bin/koha/opac-suggestions.pl OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org To reproduce: - Turn off suggestion and AnonSuggestions. - Verify there are no longer links visible in navigation and patron account to visit the OPAC suggestion page. - Try to access the page directly: .../cgi-bin/koha/opac-suggestions.pl - Verify that the page is still shown. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #1 from Marc Véron <veron@veron.ch> --- Confirmed. With both Sysprefs AnonSuggestions and suggestion turned off, I was redirected to the login page and after login the page "Your purchase suggestions" displayed. I could even put a suggestion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #2 from Marc Véron <veron@veron.ch> --- Pattern for solution in Bug 10595 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #3 from Marc Véron <veron@veron.ch> --- Maybe something for the Catalyst Open Source Academy... (Starting today) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Thomas Wright <tomsStudy@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |tomsStudy@gmail.com --- Comment #4 from Thomas Wright <tomsStudy@gmail.com> --- I'm working on this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Justin Vos <justinvos@live.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |justinvos@live.com Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Thomas Wright <tomsStudy@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #5 from Thomas Wright <tomsStudy@gmail.com> --- Created attachment 35171 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35171&action=edit Bug 12702 - Suggestions still accessible in OPAC when deactivated Added check for suggestions turned off. If off user is redirected to 404 error. If patron suggestions are off guest sugestions will also redirect to 404 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Thomas Wright <tomsStudy@gmail.com> 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=12702 --- Comment #6 from Thomas Wright <tomsStudy@gmail.com> --- Test Plan: -Set preference 'suggestion' to 'Don't Allow'. Navigate to .../cgi-bin/koha/opac-suggestions.pl *You should be presented with a 404 error. This is the case even if 'AnonSuggestions' are allowed. I am assuming that if suggestions by patrons are not wanted that AnonSuggestions are also not wanted. I think this is a reasonable assumption. -Set preference 'suggestion' to 'Allow' and set preference 'AnonSuggestions' to 'Don't Allow' Navigate to .../cgi-bin/koha/opac-suggestions.pl from a non logged in user page. *You should be presented with a login screen. Log in using that page and you should be presented with the normal suggestions page. -Set preference 'suggestion' to 'Allow' and set preference 'AnonSuggestions' to 'Allow' Navigate to .../cgi-bin/koha/opac-suggestions.pl from a non logged in user page. *You should be presented with the normal suggestions page. Log in and navigate to .../cgi-bin/koha/opac-suggestions.pl *You should be presented with the normal suggestions page. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35171|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 35175 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35175&action=edit Bug 12702 - Suggestions still accessible in OPAC when deactivated Added check for suggestions turned off. If off user is redirected to 404 error. If patron suggestions are off guest sugestions will also redirect to 404 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35175|Bug 12702 - Suggestions |[SIGNED OFF] Bug 12702 - description|still accessible in OPAC |Suggestions still |when deactivated |accessible in OPAC when | |deactivated -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=12702 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK, I'm happy with the logic here. I had to go digging a little to prove to mysefl that the assumption was valid. (Lines 530 -> 539 in commit http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac-tmp...) So, this patch does indeed fix the problem.. however as a side note, I really don't like seeing this kind of logic at the template level.. it's not testable and leads to repetative code :'(. I'de rather see the template just ask the question 'to display, or not to display?', and have the actual logic involved in that question handled further up in the code, perferably in either C4/Suggestions.pm or as part of the Koha.preference plugin somehow. That way, we'd have a testable fix. Just a thought -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #9 from Thomas Wright <tomsStudy@gmail.com> --- (In reply to Martin Renvoize from comment #8)
OK, I'm happy with the logic here. I had to go digging a little to prove to mysefl that the assumption was valid. (Lines 530 -> 539 in commit http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac- tmpl/bootstrap/en/modules/opac-results.tt; hb=544520d6bdfacada4eba4caefedf42864db4b3a0#l529)
So, this patch does indeed fix the problem.. however as a side note, I really don't like seeing this kind of logic at the template level.. it's not testable and leads to repetative code :'(.
I'de rather see the template just ask the question 'to display, or not to display?', and have the actual logic involved in that question handled further up in the code, perferably in either C4/Suggestions.pm or as part of the Koha.preference plugin somehow. That way, we'd have a testable fix. Just a thought
Should I work on this? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think not a blocker for your patch - just some thoughts about how we could handle things better. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Katrin Fischer <katrin.fischer@bsz-bw.de> 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35175|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 35281 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35281&action=edit [PASSED QA] Bug 12702 - Suggestions still accessible in OPAC when deactivated Added check for suggestions turned off. If off user is redirected to 404 error. If patron suggestions are off guest sugestions will also redirect to 404 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Agreed, not a blocker here.. it's not your job to go cleaning the code up.. this was more just a comment trying to get anyone that sees it to think a bit more when implementing such code in the first place.. had such a request been centralised in the first place this fix probably wouldn't have been needed ;) Cheers Thomas, you guys are doing a great job this year :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Thomas! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #14 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Academy | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org