TPAC search results: query from clicking author headings includes unnecessary subfields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
EG 3.8.0
PostgreSQL 10.something
TPAC
What happens: on a given page of search results, if the 1XX field of a record contains a $2 subfield (the source code for a given authority (usually taken from this list: https:/
I've attached a picture of an example. While you can't see my cursor directly, you can ascertain from the pop-up alt-text that I've highlighted the Author heading in entry 10, which would attempt the query "Le Gallant David naf" as seen in the link in the bottom left corner.
We are experiencing some other display issues with name headings in the TPAC versions of the records themselves, but I'll submit another bug for that one -- the bug here is more important as it is affecting the search process since clicking on a name with a source code goes nowhere even when it should. I hypothesize that linking the name headings to authority records may resolve this issue, but I can't speak to that with any certainty.
I found a hacky way to hide $2 by adding it to the list of excluded subfields in (custom) templates/ opac/parts/ misc_utils. tt2:
--- a/var/templates _roblib/ opac/parts/ misc_util. tt2 _roblib/ opac/parts/ misc_util. tt2 '//*[@tag= "' _ target_field _ '"]');
raw_ vals = [];
core_ val = ''; './*[not( contains( "e w 0 4 5 6 7 8 9", @code))]'); './*[not( contains( "e w 0 2 4 5 6 7 8 9", @code))]');
raw_ vals.push( subnode. textContent( ));
core_ val = raw_vals.join(" ");
+++ b/var/templates
@@ -7,7 +7,7 @@
FOR node IN xml.findnodes(
- FOR subnode IN node.findnodes(
+ FOR subnode IN node.findnodes(
END;
------
The resulting behaviour causes an errant ',' at the end of the 1xx field, but at least it is searchable.