Bug 29462 - OPACPopupAuthorsSearch doesn't work when authors include $d, $4, and possible other subfields
Summary: OPACPopupAuthorsSearch doesn't work when authors include $d, $4, and possible...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 13327
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-12 09:18 UTC by Katrin Fischer
Modified: 2021-11-16 10:39 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2021-11-12 09:18:53 UTC
When using OPACPopupAuthorsSearch with MARC records that have entries like:

700 1 _ ‡aName, Name‡d1960-‡4aut‡969108866
700 1 _ ‡aOthername, Othername‡d1945-t‡957721213

If you select both of those for search, it will create a seach link that includes the content from d and 4 with [] and the search won't work.

I am also seeing other issues where I am redirected immediately to /cgi-bin/koha/undefined but not sure yet how to recreate.
Comment 1 Katrin Fischer 2021-11-12 09:27:22 UTC
The "undefined" problem seems linked to our own XSLT, with "default" it works and only shows the subfield issue.
Comment 2 Jonathan Druart 2021-11-16 10:39:33 UTC
I am seeing a lot of code related to this feature that has been removed on

  commit 56c2856e268ec02638898923d751a0b69c716f93                                                                                                                                                                                                                                            
  Bug 12561: Remove non-XSLT views

For instance the class "authority_link" that is used in opac-detail.tt to generate the link was only used by the non-XSLT part.

It feels like we never really implemented this feature for the XSLT view.

It seems that we need to add the class "authority_link" to the link, with a data-authid

Related code is:

1876                             if( $(this).hasClass("authority_link") ){
1877                                 authid = $(this).data("authid");
1878                                 search_string = "an:" + authid;
1879                             } else {
1880                                 search_string = terms[term]["keyword_search"] + encodeURIComponent( search_label );
1881                             }