After a little digging it looks like this was caused by LP#1698206: Eliminate Staged Search. unapi.biblio_record_entry_feed replaced unapi.bre in WWW/EGCatLoader/Util.pm. Util.pm is continuing to send 'pref_lib' but it's in the wrong parameter (title). Also, unapi.biblio_record_entry_feed and unapi.metabib_virtual_record_feed don't know what to do with pref_lib once they get it. I was able to restore pref_lib functionality with the following hack on my test server. This has been very lightly. ******************************* OpenILS/WWW/EGCatLoader/Util.pm ******************************* --- Util.pm.orig 2018-03-20 15:45:29.232569315 -0400 +++ Util.pm 2018-03-20 15:47:02.348572718 -0400 @@ -406,7 +406,7 @@ $unapi_args->{site}, $unapi_args->{depth}, $slimit, - undef, undef, $unapi_args->{pref_lib} + undef, undef, undef, undef, undef, undef, undef, undef, $unapi_args->{pref_lib} ]} ); ****************************** unapi.biblio_record_entry_feed ****************************** --- unapi.biblio_record_entry_feed.txt 2018-03-16 16:44:39.928533700 -0400 +++ unapi.biblio_record_entry_feed_pls.txt 2018-03-20 16:02:46.125997337 -0400 @@ -1,6 +1,6 @@ --- Function: unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml) +-- Function: unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer) --- DROP FUNCTION unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml); +-- DROP FUNCTION unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer); CREATE OR REPLACE FUNCTION unapi.biblio_record_entry_feed( id_list bigint[], @@ -16,7 +16,8 @@ creator text DEFAULT NULL::text, update_ts text DEFAULT NULL::text, unapi_url text DEFAULT NULL::text, - header_xml xml DEFAULT NULL::xml) + header_xml xml DEFAULT NULL::xml, + pref_lib integer DEFAULT NULL::integer) RETURNS xml AS $BODY$ DECLARE @@ -44,7 +45,7 @@ xmlns_uri := COALESCE(transform.namespace_uri,xmlns_uri); -- Gather the bib xml - SELECT XMLAGG( unapi.bre(i, format, '', includes, org, depth, slimit, soffset, include_xmlns)) INTO tmp_xml FROM UNNEST( id_list ) i; + SELECT XMLAGG( unapi.bre(i, format, '', includes, org, depth, slimit, soffset, include_xmlns, pref_lib)) INTO tmp_xml FROM UNNEST( id_list ) i; IF layout.title_element IS NOT NULL THEN EXECUTE 'SELECT XMLCONCAT( XMLELEMENT( name '|| layout.title_element ||', XMLATTRIBUTES( $1 AS xmlns), $3), $2)' INTO tmp_xml USING xmlns_uri, tmp_xml::XML, title; @@ -78,5 +79,5 @@ $BODY$ LANGUAGE plpgsql STABLE COST 100; -ALTER FUNCTION unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml) +ALTER FUNCTION unapi.biblio_record_entry_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer) OWNER TO evergreen; ********************************* unapi.metabib_virtual_record_feed ********************************* --- unapi.metabib_virtual_record_feed.txt 2018-03-20 16:08:57.992353316 -0400 +++ unapi.metabib_virtual_record_feed_pls.txt 2018-03-20 17:08:31.399917068 -0400 @@ -1,6 +1,6 @@ --- Function: unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml) +-- Function: unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer) --- DROP FUNCTION unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml); +-- DROP FUNCTION unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer); CREATE OR REPLACE FUNCTION unapi.metabib_virtual_record_feed( id_list bigint[], @@ -16,7 +16,8 @@ creator text DEFAULT NULL::text, update_ts text DEFAULT NULL::text, unapi_url text DEFAULT NULL::text, - header_xml xml DEFAULT NULL::xml) + header_xml xml DEFAULT NULL::xml, + pref_lib integer DEFAULT NULL::integer) RETURNS xml AS $BODY$ DECLARE @@ -44,7 +45,7 @@ xmlns_uri := COALESCE(transform.namespace_uri,xmlns_uri); -- Gather the bib xml - SELECT XMLAGG( unapi.mmr(i, format, '', includes, org, depth, slimit, soffset, include_xmlns)) INTO tmp_xml FROM UNNEST( id_list ) i; + SELECT XMLAGG( unapi.mmr(i, format, '', includes, org, depth, slimit, soffset, include_xmlns, pref_lib)) INTO tmp_xml FROM UNNEST( id_list ) i; IF layout.title_element IS NOT NULL THEN EXECUTE 'SELECT XMLCONCAT( XMLELEMENT( name '|| layout.title_element ||', XMLATTRIBUTES( $1 AS xmlns), $3), $2)' INTO tmp_xml USING xmlns_uri, tmp_xml::XML, title; @@ -78,5 +79,5 @@ $BODY$ LANGUAGE plpgsql STABLE COST 100; -ALTER FUNCTION unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml) +ALTER FUNCTION unapi.metabib_virtual_record_feed(bigint[], text, text[], text, integer, hstore, hstore, boolean, text, text, text, text, text, xml, integer) OWNER TO evergreen;