Have a look at the Koha log file, you should see the value of $value in it.

Le mer. 18 déc. 2019 à 13:23, Tadesse, Bruck <br...@wider.unu.edu> a écrit :
>
> Jonathan,
>
> Thanks, the SQL query returns empty set. I have also added the debug 
> statement just before the line 1627 and there is no change to the error 
> message. Thinking it is a browser cache issue, I changed computer and 
> browser, the debug statement didn’t bring any change to the error message.
>
> This is how it looks now in ...C4/biblio.pm
> #---- branch
>         if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq 
> "branches" ) {
>             warn $value;
>             return Koha::Libraries->find($value)->branchname;
>   }
>
> Thanks,
> Bruck T.
>
> -----Original Message-----
> From: Jonathan Druart <jonathan.dru...@bugs.koha-community.org>
> Sent: Wednesday, December 18, 2019 1:22 PM
> To: Tadesse, Bruck <br...@wider.unu.edu>
> Cc: koha@lists.katipo.co.nz
> Subject: Re: [Koha] Software error: Can't call method "branchname" on an 
> undefined value at /usr/share/koha/lib/C4/Biblio.pm line 1627.
>
> Bruck,
>
> My understanding of the error is that you have a field that is mapped with 
> the "authorised value" branches (that's not a real authorised value). But at 
> least one of those field has a value that is not a branchcode defined in your 
> system.
>
> The weird thing is that, by default, only item's fields are mapped with 
> "branches", 952$a and 952$b Can you try this SQL query: select tagfield, 
> tagsubfield from marc_subfield_structure where authorised_value="branches" 
> and tagfield != 952; Does it return something?
>
> To know which value we are searching search, you could also add a debug 
> statement
>     warn $value;
>  before
> 1627             return Koha::Libraries->find($value)->branchname;
>
> Regards,
> Jonathan
>
> Le mer. 18 déc. 2019 à 11:37, Tadesse, Bruck <br...@wider.unu.edu> a écrit :
> >
> > Dear Karam,
> >
> > Thanks, Since the update didn’t result in solving the problem, I will 
> > revert back for now. I have taken a snapshot of the VM, so it easy to do 
> > that. I would still appreciate any advice that would help me resolve the 
> > underlying problem of updating the items.
> >
> > Thanks,
> > Bruck T.
> >
> > From: Karam Qubsi <karamqu...@gmail.com>
> > Sent: Wednesday, December 18, 2019 12:26 PM
> > To: Tadesse, Bruck <br...@wider.unu.edu>
> > Cc: koha@lists.katipo.co.nz; Allonen, Lay Poh <allo...@wider.unu.edu>
> > Subject: Re: [Koha] Software error: Can't call method "branchname" on an 
> > undefined value at /usr/share/koha/lib/C4/Biblio.pm line 1627.
> >
> > Hello Bruck,
> >
> > This query (UPDATE items SET homebranch='LIB', holdingbranch='LIB') )  is 
> > very dangerous.
> >
> > This will set all (homebranch  and holdingbranch )  in your items table to 
> > be LIB for all items!
> >
> > if that is not what you want, then try to retrieve a backup from ( 
> > /var/spool/koha ) or anywhere else you store your backups .
> >
> > Please note that LIB should be one of your branches custom code. so are you 
> > sure it is LIB in your Koha installation ?
> > Regards.
> >
> > On Wed, Dec 18, 2019 at 5:27 PM Tadesse, Bruck 
> > <br...@wider.unu.edu<mailto:br...@wider.unu.edu>> wrote:
> > Hi All,
> >
> > I have just recently upgraded to 17.05 from 16.05 and when I try to edit 
> > items on Koha, it throws the following error "Can't call method 
> > "branchname" on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 
> > 1627". I search the archive online saw the advice to update the two 
> > fields<https://lists.katipo.co.nz/public/koha/2017-September/048966.html> 
> > (UPDATE items SET homebranch='LIB', holdingbranch='LIB'). I have done that 
> > and did the full reindex. But, that does not seem to have helped. Please 
> > advise.
> >
> > Many thanks,
> > Bruck Tadesse
> > _______________________________________________
> > Koha mailing list  http://koha-community.org
> > Koha@lists.katipo.co.nz<mailto:Koha@lists.katipo.co.nz>
> > https://lists.katipo.co.nz/mailman/listinfo/koha
> >
> >
> > --
> > Karam Qubsi
> >
> > _______________________________________________
> > Koha mailing list  http://koha-community.org Koha@lists.katipo.co.nz
> > https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to