[Bug 8293] New: Software error when clicking on first or last result of each page on OPAC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Priority: P5 - low Change sponsored?: --- Bug ID: 8293 Assignee: oleonard@myacpl.org Summary: Software error when clicking on first or last result of each page on OPAC Severity: critical Classification: Unclassified OS: All Reporter: koha@univ-lyon3.fr Hardware: All Status: NEW Version: rel_3_8 Component: OPAC Product: Koha When you click on the last result of first page or first/last result of following pages of results you get this : Unsupported UNIMARC character encoding [] for XML output for UNIMARC; 100$a -> at /usr/share/perl5/MARC/File/XML.pm line 505. This happens because of the following patch : "bug_6488 followup - fixes issue with bibs with no items and serials being suppressed". + if ($items_count > 0) { next if $is_opac && $hideatopac_count >= $items_count; next if $hidelostitems && $itemlost_count >= $items_count; - + } When commented the 2 conditions lines that have been added, the records display correctly again. Strangely, this patch seems not to have been validated (cf comments thread in Bug 6488). But may be, I missed something... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_8 |master Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 11446 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11446&action=edit Proposed patch Very small patch for a big bug. Some have this error message : Software error: Can't call method "data" on an undefined value at /home/kokha/src/C4/Search.pm line 1505. The problem appears in the 'searchAgain' function in opac-detail.pl. This function is called only on a detail page that is at the end or the begining of a result page. So : In opac-detail.pl, in searchResults method call : The zebra results are used in a hash instead of an array (see opac-results.pl). + The parameter giving hidelostitems syspref is useless, this syspref is managed into method. Please test and signoff. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- I can't reproduce this error Here's what I did Search for fish Click on the 20th result .. no error Click on to page 2 Click on the first result ... no error What am I doing wrong? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- The fix for this was pushed several months ago. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- No wonder I can't recreate this, were you testing on master Fridolyn ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 --- Comment #5 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- I'm up to date on master : v3.09.00.030. I forgot to say you must activate 'OpacBrowseResults' syspref. I user Koha sandbox n°2 database. @Jared Camins-Esakov : Do you know which bug/commit ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 --- Comment #6 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Seems linked to Bug 7894 / commit d13f5780dfeb062a9c677043b89f82d7d7a60b3a -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7894 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 --- Comment #7 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- In my opinion, the bug can be explained by looking at the actual code (v3.09.00.030): In opac-details.pl, the searchAgain method contains : my @records = $results_hashref->{$server}->{"RECORDS"}; @newresults = searchResults('opac', '', $hits, $results_per_page, $offset, $arrParamsBusc->{'scan'}, \@records,, C4::Context->preference('hidelostitems')); But, in opac-search.pl there is : @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, $results_hashref->{$server}->{"RECORDS"}); In both, $results_hashref comes from C4::Search::getRecords. In this method, search results are added to the results of a server by : $results_hash->{'RECORDS'}[$j] = $record; So the hash entry $results_hash->{'RECORDS'} contains a ref to an array of records. Therefore, my patch proposes to use in opac-details.pl/searchAgain the same syntax as in opac-search.pl where it works fine. Test : ------ You can reproduce the bug by using Sandbox n°2 (check that OpacBrowseResults syspref is on) : http://wiki.koha-community.org/wiki/Sandboxes. Perform a search with more than 20 results and click on first result of second page. I think it corrects the bug 7894 which is not fully corrected : see http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7894#c7 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11446|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 11787 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11787&action=edit Bug 8293: Software error when clicking on first or last result of each page on OPAC Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off CC| |jonathan.druart@biblibre.co | |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- The proposed patch fixes the problem for me. - Enable the OpacBrowseResults - launch a search with more than 20 results - click on page 2 - click on the first result - boum ... SearchResult wants 7 arguments, 8 are given with the current code, so the last one is useless. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 11790 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11790&action=edit Bug 8293: Replace IFNULL with COALESCE mysql> SELECT IFNULL(0, 123); +----------------+ | IFNULL(0, 123) | +----------------+ | 0 | +----------------+ 1 row in set (0.00 sec) mysql> SELECT IFNULL(1, 123); +----------------+ | IFNULL(1, 123) | +----------------+ | 1 | +----------------+ 1 row in set (0.00 sec) mysql> SELECT IFNULL(NULL, 123); +-------------------+ | IFNULL(NULL, 123) | +-------------------+ | 123 | +-------------------+ 1 row in set (0.00 sec) mysql> SELECT COALESCE(0, 123); +------------------+ | COALESCE(0, 123) | +------------------+ | 0 | +------------------+ 1 row in set (0.00 sec) mysql> SELECT COALESCE(1, 123); +------------------+ | COALESCE(1, 123) | +------------------+ | 1 | +------------------+ 1 row in set (0.00 sec) mysql> SELECT COALESCE(NULL, 123); +---------------------+ | COALESCE(NULL, 123) | +---------------------+ | 123 | +---------------------+ 1 row in set (0.00 sec) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11790|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 11790 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11790 Bug 8293: Replace IFNULL with COALESCE Oups, wrong bug ! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com QA Contact| |mtj@kohaaloha.com --- Comment #12 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #8)
Created attachment 11787 [details] Bug 8293: Software error when clicking on first or last result of each page on OPAC
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
passing QA on this... $ koha-qa.pl -v 2 testing 1 commit(s) (applied to commit ba98cb9) * ec365ff Bug 8293: Software error when clicking on first or last result of each page on OPAC opac/opac-detail.pl - perlcritic-progressive tests... OK - perl -c syntax tests... OK - xt/tt_valid.t tests... OK - xt/author/valid-template.t tests... OK - t/00-valid-xml.t tests... OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> --- This bug fixes an obvious API call and also fixes the problem. Although the message can seem to be UNIMARC related, it is not (and I haven't the same message on my setup). Patch pushed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 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.8.x, will be in 3.8.5 I also pushed a follow up to update the POD so people won't read that and be confused. I will attach that patch here for sign off and inclusion in master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11787|0 |1 is obsolete| | --- Comment #15 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 11934 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11934&action=edit Bug 8293 : Fixing POD to match actuality. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Chris Cormack <chris@bigballofwax.co.nz> 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=8293 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11934|0 |1 is obsolete| | --- Comment #16 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 11946 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11946&action=edit Bug 8293 Fixing POD to match actuality Signed off (Just a comment change) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Fridolyn SOMERS <fridolyn.somers@biblibre.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=8293 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- Last patch passes QA (FIX POD) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8293 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Stable --- Comment #18 from Paul Poulain <paul.poulain@biblibre.com> --- Follow-up pushed, everything in master & stable if i'm not mistaking, setting status accordingly -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org