Created attachment 59490 [details] [review] Bug 17980: Fix wrong call to ModZebra in AddAuthority (affects Elastic Search users) The ModZebra call in AddAuthority incorrectly passes five parameters to ModZebra including $oldRecord. This makes the last parameter (the new record) being ignored !! A closer inspection of ModZebra reveals that this only affects installs using Elastic Search. The record parameter is ignored when you still use Zebra. Note: Keep in mind that AddAuthority is being used in adding as well as modifying authority records. This patch is part of a larger effort to make improvements in this area and will not be last one. Please help to get this further (see bug 17908). Trivial fix. Test plan: [1] If you use Elastic Search, verify that the new authority record is being indexed, not the old one. [2] If you do not use Elastic Search, add or modify an authority and search for this change in Authority (Search entire record).
Chris or Nick: could one of you please confirm the Elastic Search side? Thanks.
Actually, the Elastic Search problem is larger than this: Look at ModZebra itself: if ( $op eq 'specialUpdate' ) { unless ($record) { $record = GetMarcBiblio($biblionumber, 1); } my $records = [$record]; $indexer->update_index_background( [$biblionumber], [$record] ); } This code is wrong in case you call ModZebra for an authority !
(In reply to Marcel de Rooy from comment #3) > Actually, the Elastic Search problem is larger than this: > Look at ModZebra itself: > if ( $op eq 'specialUpdate' ) { > unless ($record) { > $record = GetMarcBiblio($biblionumber, 1); > } > my $records = [$record]; > $indexer->update_index_background( [$biblionumber], [$record] ); > } > > This code is wrong in case you call ModZebra for an authority ! At least if you pass no record and call GetMarcBiblio :)
Created attachment 59491 [details] [review] Bug 17980: Corresponding fix in DelAuthority The call to ModZebra here does not need more than three parameters. Same for Zebra and Elastic Search. Note: On omnibus bug 17908 a few more fixes are coming on this subject of deleting authorities. Test plan: [1] Delete an authority. [2] Search for it in the Authority module.
Created attachment 59492 [details] [review] Bug 17980: Corresponding fix in DelAuthority The call to ModZebra here does not need more than three parameters. Same for Zebra and Elastic Search. Note: On omnibus bug 17908 a few more fixes are coming on this subject of deleting authorities. Test plan: [1] Delete an authority. [2] Search for it in the Authority module. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Closed in favor of the combination of bugs 18014 (pushed) and 18070 (SO). *** This bug has been marked as a duplicate of bug 18014 ***