Bug 21088 - Load the correct biblio or item-level link from tracklinks.pl
Summary: Load the correct biblio or item-level link from tracklinks.pl
Status: RESOLVED DUPLICATE of bug 21018
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 17.05
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-19 04:26 UTC by Alex Buckley
Modified: 2018-08-01 22:07 UTC (History)
2 users (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 Alex Buckley 2018-07-19 04:26:33 UTC
When the TrackLastPatronActivity and TrackClicks sysprefs are enabled all biblio and item level links (these are links stored in the 856u or 952u MARC subfields) on the OPAC are displayed on the template in the format: /cgi-bin/koha/tracklinks.pl?uri=<uri>&biblionumber=<biblionumber>

i.e. all biblio and item level holds do not link directly to an external site, but redirect to tracklinks.pl

In tracklinks.pl the links associated with the biblionumber are retrieved by the call to C4::Biblio->GetMARCUrls.

However only the first url returned in the array form this function is assigned as the url to load and so if there are multiple links in the 856u or 952u fields then only the first link is ever loaded. 

As we are handing the url as a cgi parameter to the tracklinks.pl we should compare each url in the returned url array if it is equal to the url cgi parameter and choose which url to refirect to accordingly. 

This would mean biblios with multiple online resources would load the correct external link depending which link was selected.
Comment 1 Jonathan Druart 2018-07-19 12:43:49 UTC
Is it a duplicate of bug 21018?
Comment 2 Katrin Fischer 2018-08-01 22:07:17 UTC

*** This bug has been marked as a duplicate of bug 21018 ***