[Koha-bugs] [Bug 23714] New: Problem with ILLModuleUnmediated

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 1 16:56:42 CEST 2019


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

            Bug ID: 23714
           Summary: Problem with ILLModuleUnmediated
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: ILL
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no

If you run this:

$ sudo koha-shell -c "prove t/db_dependent/Illrequests.t" kohadev

you get this:

Use of uninitialized value in concatenation (.) or string at
/home/vagrant/kohaclone/Koha/Illrequest.pm line 857.
Use of uninitialized value in concatenation (.) or string at
/home/vagrant/kohaclone/Koha/Illrequest.pm line 859

(Among some other warnings that are fixed on bug 23712.)

Lines 857 and 859 look like this:

    my $intra_tmpl =  join "/", $backend_tmpl, "intra-includes",
        $params->{method} . ".inc";
    my $opac_tmpl =  join "/", $backend_tmpl, "opac-includes",
        $params->{method} . ".inc";

$params->{method} is uninitialized because of these lines in
Koha::Illrequest::backend_create():

    if ( C4::Context->preference("ILLModuleUnmediated") && $permitted ) {
        my $unmediated_result = $self->_backend_capability(
            'unmediated_ill',
            $args
        );
        $result = $unmediated_result if $unmediated_result;
    }

This replaces whatever was in $result. So before this code you can have a
$result that looks like this:

$VAR1 = {
          'stage' => 'commit',
          'method' => 'create',
          'permitted' => 1
        };

and after the code it looks like this:

$VAR1 = {
          'unmediated_ill' => 1
        };

Is this the intended behaviour? If no, we should fix it (add 'unmediated_ill'
=> 1 to the existing data instead of replacing it?). If yes, we should make
expandTemplate() handle a missing method more gracefully.

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


More information about the Koha-bugs mailing list