https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6892

--- Comment #14 from Jan Kissig <[email protected]> ---
Created attachment 193170
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193170&action=edit
Bug 6892: (follow-up) Fix urls in OPAC when TrackClicks is enabled

This patch fixes outgoing links from 856$u when system preference 'TrackClicks'
is set and the URL is lacking the protocol prefix.

Test plan:

a) set system pref TrackClicks to 'Track' or 'Track anonymously'
b) edit a record (f.e. 262) and set the following 856 fields (the record from
1st patch is sufficient though):
 1. 856 ind1=4 $u = example.com
 2. 856 $u = example.com
 3. 856 $u = https://example.com
b) save and search for that record in OPAC.
c) on search results list (opac-search.pl) please check the links on that
record:
 1. links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=example.com&biblionumber=262
and does not work
 2. links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=example.com&biblionumber=262
and does not work
 3. links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=https://example.com&biblionumber=262
and works
d) click on the record to get to the detail page (opac-detail.pl) and check the
links again (Online resources). They should be the same as in step c)

e) apply patch, call restart_all and redo step b) until d) verifying that
 1. is now prefixed with http:// and links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=http://example.com&biblionumber=262
(works now)
 2. is now prefixed with http:// and links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=http://example.com&biblionumber=262
(works now)
 3. still links to
http://main.localhost/cgi-bin/koha/tracklinks.pl?uri=https://example.com&biblionumber=262

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to