[Bug 16179] New: Clicking Rate me button in OPAC without selecting rating produces error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Bug ID: 16179 Summary: Clicking Rate me button in OPAC without selecting rating produces error Change sponsored?: --- Product: Koha Version: 3.20 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jyorio@esilibrary.com QA Contact: testopia@bugs.koha-community.org When a patron clicks on Rate me button on the detail screen without selecting a rating option, the following error is produced: Software error: DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null at /usr/share/koha/lib/C4/Ratings.pm line 208 For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error Related to this, patrons who are not logged in, can still click the Rate me button, but are unable to make a rating selection and will get the error message as a result. Ideally, in either case, they would receive a more user-friendly message rather than the error above. Steps to reproduce: 0) Do not log in 1) Search the catalog for a title 2) View one of the search results 3) Click on the Rate me button OR 0) Log in 1) Search the catalog for a title 2) View one of the search results 3) Click on the Rate me button -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- The first step in diagnosing this problem is to figure out why you see a "rate me" button in the first place. The star ratings JavaScript should hide that button automatically. That you see a "rate me" button indicates that there is a JavaScript error on the page which is interrupting execution. Do you have any custom JavaScript in OPACUserJS? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Owen, I get the error when JS is disabled. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=16179 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49858&action=edit Bug 16179: Do not crash if "rate me" is clicked and not rate selected If JS is disabled and a user clicks on the "Rate me" button, Koha will crashes with: DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null at /usr/share/koha/lib/C4/Ratings.pm line 208 To avoid that, opac-ratings.pl will check if a rate has been selected. Test plan: Disable JS On a record detail page, click on the "Rate me" button -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.20 |master Severity|minor |normal Assignee|oleonard@myacpl.org |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi, disabling JavaScript gives an empty OPAC page (chrome/firefox), or more properly a 'hidden' page. This without patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Bernardo Gonzalez Kriegel from comment #4)
Hi, disabling JavaScript gives an empty OPAC page (chrome/firefox), or more properly a 'hidden' page.
This issue now has a bug report: Bug 16210. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org Depends on| |16210 --- Comment #6 from Christopher Brannon <cbrannon@cdalibrary.org> --- I find this impossible to test without bug 16210 addressed. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16210 [Bug 16210] Bug 15111 breaks the OPAC if JavaScript is disabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49858|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 49936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49936&action=edit Bug 16179: Do not crash if "rate me" is clicked and not rate selected If JS is disabled and a user clicks on the "Rate me" button, Koha will crashes with: DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null at /usr/share/koha/lib/C4/Ratings.pm line 208 To avoid that, opac-ratings.pl will check if a rate has been selected. Test plan: Disable JS On a record detail page, click on the "Rate me" button TESTED PLAN: 1) go to /cgi-bin/koha/opac-ratings.pl?biblionumber=1 -- kaboom as above. 2) apply patch 3) refresh -- either login screen (don't know why) -- or if already logged in, detail page. 4) koha qa test tool NOTE: disabling JS breaks OPAC. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=16179 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49936|0 |1 is obsolete| | --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 50030 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50030&action=edit [SIGNED-OFF] Bug 16179: Do not crash if "rate me" is clicked and not rate selected If JS is disabled and a user clicks on the "Rate me" button, Koha will crashes with: DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null at /usr/share/koha/lib/C4/Ratings.pm line 208 To avoid that, opac-ratings.pl will check if a rate has been selected. Test plan: Disable JS On a record detail page, click on the "Rate me" button TESTED PLAN: 1) go to /cgi-bin/koha/opac-ratings.pl?biblionumber=1 -- kaboom as above. 2) apply patch 3) refresh -- either login screen (don't know why) -- or if already logged in, detail page. 4) koha qa test tool Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> I tested successfully by temporarily removing the modification made by Bug 16210. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=16179 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50030|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 50222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50222&action=edit [PASSED QA] Bug 16179: Do not crash if "rate me" is clicked and not rate selected If JS is disabled and a user clicks on the "Rate me" button, Koha will crashes with: DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null at /usr/share/koha/lib/C4/Ratings.pm line 208 To avoid that, opac-ratings.pl will check if a rate has been selected. Test plan: Disable JS On a record detail page, click on the "Rate me" button TESTED PLAN: 1) go to /cgi-bin/koha/opac-ratings.pl?biblionumber=1 -- kaboom as above. 2) apply patch 3) refresh -- either login screen (don't know why) -- or if already logged in, detail page. 4) koha qa test tool Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> I tested successfully by temporarily removing the modification made by Bug 16210. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16179 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- Pushed to 3.22.x, will be in 3.20.11. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org