[Bug 38832] New: Dead code in catalogue/search.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Bug ID: 38832 Summary: Dead code in catalogue/search.pl Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@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=38832 Jonathan Druart <jonathan.druart@gmail.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=38832 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 176151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176151&action=edit Bug 38832: Remove code related to outer_servers_loop and outer_sup_servers_loop This is clearly dead code as it's never set in the controller file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 176152 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176152&action=edit Bug 38832: Remove authority search from catalogue/search This one is less obvious, how is it possible to request an authority search using catalogue/search.pl? Is it dead code or is it actually used somewhere? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38714 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38714 [Bug 38714] [OMNIBUS] Adjust templates for prettier -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 176151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176151 Bug 38832: Remove code related to outer_servers_loop and outer_sup_servers_loop Review of attachment 176151: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=38832&attachment=176151) ----------------------------------------------------------------- ::: catalogue/search.pl @@ -320,5 @@
- $template->param(outer_servers_loop => $primary_servers_loop,); - - my $secondary_servers_loop; - $template->param(outer_sup_servers_loop => $secondary_servers_loop,); -
Yeah this code looks like it was never actually implemented. Added in 2007 but the variables never populated. Then partially removed in 2009. May as well remove the rest now. Note that this same dead code also exists in opac/opac-search.pl, although it looks like it's already been removed from the OPAC templates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 176152 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176152 Bug 38832: Remove authority search from catalogue/search Review of attachment 176152: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=38832&attachment=176152) ----------------------------------------------------------------- I think this is probably dead code. If you try to trigger this code, it just breaks Koha in many cases, since it's hard-coded to only work with Personal Name authorities: 1. Go to /cgi-bin/koha/catalogue/search.pl?q=e&server=authorityserver 2. Get this error: Can't call method "subfield" on an undefined value at /kohadevbox/koha/catalogue/search.pl line 710 Technically, you can get it to sort of work with the following: 1. Go to /cgi-bin/koha/catalogue/search.pl?q=Alvarez&server=authorityserver 2. On the right hand side of the screen, you'll have a link for "Alvarez Felix, Enrique," under a plain text heading of "authorityserver" 3. Clicking on the link just takes you to search.pl though since the link isn't properly formed Given the age of the code, it looks like something that probably never worked right in Koha 3+ -- In some ways, it's an interesting idea. It could be interesting to do an asynchronous search against the authority server and present it in a nice way, but we'd want to implement it in a very different way I think... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- If you go to /cgi-bin/koha/catalogue/search.pl?q=Alvarez&server=authorityserver&server=biblioserver you see biblio results and authority results, but again... this only works because of a carefully crafted query. It would break most of the time, so we'd be better off taking it out now anyway. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from David Cook <dcook@prosentient.com.au> --- There's a couple of QA tool failures. I imagine the tidiness one could probably be ignored I guess, but that $page issue should be fixed. (Actually, I think neither of the $page variables are actually used anywhere...) Thanks for taking a look at the search scripts. They can clearly benefit from a review... -- FAIL catalogue/search.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 222, now: 274) FAIL valid "my" variable $page masks earlier declaration in same scope OK koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt OK koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- Noting that these patches make /cgi-bin/koha/catalogue/search.pl?q=Alvarez&server=authorityserver&server=biblioserver the same as cgi-bin/koha/catalogue/search.pl?q=Alvarez So confirming that they do work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176151|0 |1 is obsolete| | --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 176167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176167&action=edit Bug 38832: Remove code related to outer_servers_loop and outer_sup_servers_loop This is clearly dead code as it's never set in the controller file. Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176152|0 |1 is obsolete| | --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Created attachment 176168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176168&action=edit Bug 38832: Remove authority search from catalogue/search This one is less obvious, how is it possible to request an authority search using catalogue/search.pl? Is it dead code or is it actually used somewhere? Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- Created attachment 176169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176169&action=edit Bug 38832: (QA follow-up) Remove unused $page variables Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Pedro Amorim <pedro.amorim@ptfs-europe.com> 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=38832 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176167|0 |1 is obsolete| | --- Comment #11 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 176336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176336&action=edit Bug 38832: Remove code related to outer_servers_loop and outer_sup_servers_loop This is clearly dead code as it's never set in the controller file. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Pedro Amorim <pedro.amorim@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=38832 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176168|0 |1 is obsolete| | --- Comment #12 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 176337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176337&action=edit Bug 38832: Remove authority search from catalogue/search This one is less obvious, how is it possible to request an authority search using catalogue/search.pl? Is it dead code or is it actually used somewhere? Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Pedro Amorim <pedro.amorim@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=38832 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176169|0 |1 is obsolete| | --- Comment #13 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 176338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176338&action=edit Bug 38832: (QA follow-up) Remove unused $page variables Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Pedro Amorim <pedro.amorim@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=38832 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |pedro.amorim@ptfs-europe.co |y.org |m CC| |pedro.amorim@ptfs-europe.co | |m Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.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=38832 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This removes unused code release notes| |for catalog searching in | |the staff interface. CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38832 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #16 from David Nind <david@davidnind.com> --- Internal architecture related, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org