[Koha-bugs] [Bug 35618] catalogue/showelastic.pl uses deprecated/removed parameter "type"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 21 22:34:43 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35618

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|                            |This fixes the display when
      release notes|                            |clicking on "Show" for the
                   |                            |"Elasticsearch record"
                   |                            |entry for a record in the
                   |                            |staff interface. Before
                   |                            |this fix, a page not found
                   |                            |(404) was displayed when
                   |                            |viewing a record using
                   |                            |Elasticsearch 7 or 8, or
                   |                            |Open Search 1 ord 2. (Note
                   |                            |that Elasticsearch 6 is no
                   |                            |longer supported.)

--- Comment #3 from David Nind <david at davidnind.com> ---
Testing notes (using koha-testing-docker (KTD)):

1. Start up KTD with Elasticsearch 8 (ktd --es8 up)

2. In the staff interface, search and view a record.

3. For "Elasticsearch Record", click on the "Show" link.
   ==> Pop up window says "An error has occured Error 404..."
   ==> In /var/log/koha/kohadev/plack-intranet-error.log there is a warning:

       ES8:
       [2023/12/21 20:40:33] [WARN] [Request] ** [http://es:9200]-[400] no
handler found for uri [/koha_kohadev_biblios/data/46] and method [GET], called
from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at
/kohadevbox/koha/catalogue/showelastic.pl line 61. With vars: {'request' =>
{'body' => undef,'method' => 'GET','serialize' => 'std','path' =>
'/koha_kohadev_biblios/data/46','ignore' => [],'qs' => {}},'body' => {'error'
=> 'no handler found for uri [/koha_kohadev_biblios/data/46] and method
[GET]'},'status_code' => 400}

       ES7:
       [2023/12/21 21:05:31] [WARN] [Missing] ** [http://es:9200]-[404] Not
Found, called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at
/kohadevbox/koha/catalogue/showelastic.pl line 61. With vars: {'request' =>
{'ignore' => [],'qs' => {},'path' => '/koha_kohadev_biblios/data/32','method'
=> 'GET','serialize' => 'std','body' => undef},'status_code' => 404,'body' =>
{'_index' => 'koha_kohadev_biblios','_type' => 'data','found' => bless( do{\(my
$o = 0)}, 'JSON::PP::Boolean' ),'_id' => '32'}}

       OS1:
       [2023/12/21 21:15:14] [WARN] [Missing] ** [http://es:9200]-[404] Not
Found, called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at
/kohadevbox/koha/catalogue/showelastic.pl line 61. With vars: {'request' =>
{'ignore' => [],'path' => '/koha_kohadev_biblios/data/32','method' =>
'GET','qs' => {},'serialize' => 'std','body' => undef},'status_code' =>
404,'body' => {'_type' => 'data','_id' => '32','found' => bless( do{\(my $o =
0)}, 'JSON::PP::Boolean' ),'_index' => 'koha_kohadev_biblios'}}

       OS2:
       [2023/12/21 21:25:04] [WARN] [Request] ** [http://es:9200]-[400] no
handler found for uri [/koha_kohadev_biblios/data/5] and method [GET], called
from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at
/kohadevbox/koha/catalogue/showelastic.pl line 61. With vars: {'body' =>
{'error' => 'no handler found for uri [/koha_kohadev_biblios/data/5] and method
[GET]'},'status_code' => 400,'request' => {'body' => undef,'method' =>
'GET','path' => '/koha_kohadev_biblios/data/5','qs' => {},'ignore' =>
[],'serialize' => 'std'}}

4. Apply the patch and restart_all.

5. Repeat steps 2-3:
   ==> The pop-up window should now show the Elasticsearch record and no
warning in the log [1].

6. Repeat using Elasticsearch 7 (ktd --es7 up), OpenSearch 1 (ktd --os1 up)and
OpenSearch 2 (ktd --es7 up).


[1] Note that there are two warnings in the log - these are generated when you
view the record in the staff interface, so I'm assuming that these are
unrelated to this bug:

[2023/12/21 20:49:44] [WARN] DBIx::Class::ResultSetColumn::new(): Attempting to
retrieve non-unique column 'biblionumber' on a resultset containing one-to-many
joins will return duplicate results. at /kohadevbox/koha/Koha/Objects.pm line
426

[2023/12/21 20:49:44] [WARN] DBIx::Class::ResultSet::_construct_results():
Unable to properly collapse has_many results in iterator mode due to order
criteria - performed an eager cursor slurp underneath. Consider using ->all()
instead at /kohadevbox/koha/Koha/Objects.pm line 317

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list