[Koha] Fwd: Unable to reindex after massive upgrade
Tim Young
Tim.Young at LightSys.org
Wed Jun 28 06:46:09 NZST 2017
Great! Thanks. & Thanks for the sql. Worked fine.
- Tim
On 6/27/2017 12:55 PM, Tomas Cohen Arazi wrote:
> Tim, the authorised_values_branches table is not related.
>
> The problem is that there are fields in your record(s) that are
> expected to contain a branchcode. And they don't. That's why
> Koha::Libraries->find() is returning an undefined value (undef in Perl).
>
> When you removed the FK constraint, you did hide the basic problem of
> inconsistency.
>
> I suggest that you find your only library's branchcode and make sure
> your items all have homebranch and holdingbranch set to that. Then
> reindex. You should do it like this:
>
> # Enter to mysql
> $ sudo koha-mysql lib
> > UPDATE items SET homebranch='LIB', holdingbranch='LIB';
> > \q
> $ sudo koha-rebuild-zebra -f -a -b -v lib
>
> Note: replace 'lib' for your instance name, and 'LIB' for your
> library's branchcode.
>
> Regards.
>
>
> El mar., 27 jun. 2017 a las 13:59, Tim Young (<Tim.Young at lightsys.org
> <mailto:Tim.Young at lightsys.org>>) escribió:
>
> Awesome. Thanks. I may be able to figure it out (I am pretty good at
> poking and prodding, and finally figuring it out). I believe we only
> have one branch, so I should be able to simply replace everything
> in the
> sql to match the correct branch... (Yikes! Branchcode is used all over
> the place!)
>
> BUT, I am a sysadmin, not a Koha admin. This looks like it might be
> easier to fix through the web interface... So excuse the dumb
> questions. :)
>
> That particular error seems to stem from something be authorized by
> branches. My "authorised_values_branches" table is empty. Should
> I set
> up an authorized branch or something somewhere?
>
> We do have a branch configured (I can see it in the branches table)...
>
> The code seems to be looking at
> Koha::Libraries->find($value)->branchname;
>
> and (I have "value" being undefined, or defined improperly. But I do
> not see a libraries table...)
>
> But, at the same time:
> $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq
> "branches". So I
> somewhere seem to be saying to authorize by branch, and I do not have
> any authorized branches (or the authorised_values_branches is
> empty)...
>
> Is there a simple web area I should check out before I jump into the
> mysql and make changes that might not be supported?
>
> - Tim
>
>
> On 6/27/2017 9:26 AM, Tomas Cohen Arazi wrote:
> > You need to fix your data, so fields linked to branch codes actually
> > contain valid branchcodes. The band aid will work, but I think you
> > need to fix your data for good.
> >
> > Koha got stricter regarding the data quality/completeness. This
> > particular case could be saved by some tweak like the one you
> propose.
> > It is maybe worth filling a bug, because the previous behaviour
> worked
> > more gracefuly.
> >
>
> _______________________________________________
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
> --
> Tomás Cohen Arazi
> Theke Solutions (https://theke.io <http://theke.io/>)
> ✆ +54 9351 3513384
> GPG: B2F3C15F
More information about the Koha
mailing list