[Bug 17526] New: OPAC lists require a sortfield
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Bug ID: 17526 Summary: OPAC lists require a sortfield Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Lists Assignee: gmcharlt@gmail.com Reporter: philippe.blouin@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Using the OPAC, going into the public lists, I click one of them and get DBIx::Class::Storage::DBI::_dbh_execute(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 10) `me` JOIN `biblio` `biblionumber` ON `biblionumber`.`biblionumber' THis is because the sortfield is empty and creates a SQL like GROUP BY ASC LIMIT 10. Missing the group by. In the intranet list, there's a default usage of 'title' that makes it all work. TESTING: 1) just create a public list with no sortfield. - virtualshelves.category = 2 - virtualshelves.sortfield = '' 2) click on the list in the OPAC's public list. Boom! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal Patch complexity|--- |Trivial patch CC| |eric.begin@inLibro.com, | |francois.charbonnier@inlibr | |o.com, | |philippe.blouin@inlibro.com Assignee|gmcharlt@gmail.com |philippe.blouin@inlibro.com --- Comment #1 from Blou <philippe.blouin@inlibro.com> --- This also happens in 3.22, btw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- Created attachment 57010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57010&action=edit Bug 17526 - OPAC lists require a sortfield Using the OPAC, going into the public lists, we click one of them and get DBIx::Class::Storage::DBI::_dbh_execute(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 10) `me` JOIN `biblio` `biblionumber` ON `biblionumber`.`biblionumber' THis is because the sortfield is empty and creates a SQL like GROUP BY ASC LIMIT 10. Missing the group by <what?>. In the intranet list, there's a default usage of 'title' that makes it all work. TESTING: 1) just create a public list with no sortfield. In the DB: - virtualshelves.category = 2 - virtualshelves.sortfield = '' 2) click on the list in the OPAC's public list. Boom! This simple patch uses 'title' if nothing else is specified. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz 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=17526 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57010|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 57104 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57104&action=edit Bug 17526 - OPAC lists require a sortfield Using the OPAC, going into the public lists, we click one of them and get DBIx::Class::Storage::DBI::_dbh_execute(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 10) `me` JOIN `biblio` `biblionumber` ON `biblionumber`.`biblionumber' THis is because the sortfield is empty and creates a SQL like GROUP BY ASC LIMIT 10. Missing the group by <what?>. In the intranet list, there's a default usage of 'title' that makes it all work. TESTING: 1) just create a public list with no sortfield. In the DB: - virtualshelves.category = 2 - virtualshelves.sortfield = '' 2) click on the list in the OPAC's public list. Boom! This simple patch uses 'title' if nothing else is specified. Reproduced. Patch fixes issue as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This should no longer be possible from the interface, so what about updating the bad data as well? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Cannot reproduce this from the interface. The request for a dbrev repairing bad data is a valid one. Changing status -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #6 from Blou <philippe.blouin@inlibro.com> --- But the data is there, the user doesn't really care that it won't happen anymore with the new interface. It seems that a simple default value is a very valid programming. In this case and in most others. This is not a failed QA. This is a "In Discussion" death sentence... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Blou from comment #6)
But the data is there, the user doesn't really care that it won't happen anymore with the new interface. It seems that a simple default value is a very valid programming. In this case and in most others.
This is not a failed QA. This is a "In Discussion" death sentence...
Hum? Marcel is just asking the same thing as me: update the existing bad data. so set searchfield="title" where searchfield is null or "" and we are done. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Blou from comment #6)
But the data is there, the user doesn't really care that it won't happen anymore with the new interface. It seems that a simple default value is a very valid programming. In this case and in most others.
This is not a failed QA. This is a "In Discussion" death sentence...
This is not a death sentence. Just add a small atomicupdate dbrev. I do not have a strong opinion about the line in opac-shelves. It should not be necessary, but it would not hurt either. Although Failed QA or In Discussion may look like the final destination of some patches, this generally speaking does not have to be so. (This one is not in that category at all.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This patch is no longer relevant, it has been fixed by commit 45cffd874c62c7b090390c5fb3c955c31f524608 Bug 17901: Fix possible SQL injection in shelf editing However we could update the existing bad data anyway. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Summary|OPAC lists require a |OPAC lists sortfield breaks |sortfield |with a ( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|philippe.blouin@inlibro.com |mtompset@hotmail.com Status|Failed QA |ASSIGNED --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Repurposing... See also bug 22941 and bug 23084. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 M. Tompsett <mtompset@hotmail.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=17526 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57104|0 |1 is obsolete| | --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 90584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90584&action=edit Bug 17526: Change grep to deal with malformed sortfield Giving sortfield a malformed value when viewing lists results in Internal Server Error. eg. http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=1&sortfield=title( Note the trailing ( Before Patch: kaboom apply patch restart After Patch: No kaboom -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90584|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 90641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90641&action=edit Bug 17526: Change grep to deal with malformed sortfield Giving sortfield a malformed value when viewing lists results in Internal Server Error. eg. http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=1&sortfield=title( Note the trailing ( Before Patch: kaboom apply patch restart After Patch: No kaboom Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Needs Signoff |Signed Off --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Simple fix which works well for me, Signing Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 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=17526 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90641|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 90695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90695&action=edit Bug 17526: Change grep to deal with malformed sortfield Giving sortfield a malformed value when viewing lists results in Internal Server Error. eg. http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=1&sortfield=title( Note the trailing ( Before Patch: kaboom apply patch restart After Patch: No kaboom 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable Version(s)|19.11.00 |19.11.00,19.05.01 released in| | --- Comment #16 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22941 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 --- Comment #17 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Same fix as Bug 22941, nice catch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17526 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|OPAC lists sortfield breaks |OPAC lists sortfield breaks |with a ( |with a `(` -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org