I did a quick test with the TrackClicks preference and it appears to break URLs with multiple parameters? The second URL parameter is cut of for the links I looked at: Without TrackClicks: http://<domain_external>?identifier=1003033849-9-1373538128402-3&field=ALLEGROID With TrackClicks set to track anonymously: URL visible in the OPAC: https://<domain_opac>/cgi-bin/koha/tracklinks.pl?uri= http://<domain_external>?identifier=1003033849-9-1373538128402-3&field=ALLEGROID;biblionumber=2647 URL it tries to access: http://<domain_external>?identifier=1003033849-9-1373538128402-3 ... will result in an error message in this case as an important bit is missing.
(In reply to Katrin Fischer from comment #0) > I did a quick test with the TrackClicks preference and it appears to break > URLs with multiple parameters? The second URL parameter is cut of for the > links I looked at: > > Without TrackClicks: > http://<domain_external>?identifier=1003033849-9-1373538128402- > 3&field=ALLEGROID > > With TrackClicks set to track anonymously: > > URL visible in the OPAC: > https://<domain_opac>/cgi-bin/koha/tracklinks.pl?uri= > http://<domain_external>?identifier=1003033849-9-1373538128402- > 3&field=ALLEGROID;biblionumber=2647 > > URL it tries to access: > http://<domain_external>?identifier=1003033849-9-1373538128402-3 > ... will result in an error message in this case as an important bit is > missing. Oops, I just bumped into this too. I'll take a look now...
Created attachment 48484 [details] [review] Bug 14441 - TrackClicks cuts off/breaks URLs to test... 1/ set TrackClicks syspref to 'track' 2/ add a problematic multipart url to an item's 'url' field example url: http://foo.corg?key1=val1&key2=val2 3/ test url in opac-detail.pl - url is corrupt 4/ apply patch - url is corrct
Created attachment 48485 [details] [review] Bug 14441 - TrackClicks cuts off/breaks URLs to test... 1/ set TrackClicks syspref to 'track' 2/ add a problematic multipart url to an item's 'url' field example url: http://foo.corg?key1=val1&key2=val2 3/ test url in opac-detail.pl - url is corrupt 4/ apply patch - url is corrct
Comment on attachment 48484 [details] [review] Bug 14441 - TrackClicks cuts off/breaks URLs oops
Hm, I tested with 856 first, which is still broken, but this is a first partial fix. My test was with a search URL from the Koha OPAC: http://localhost:8080/cgi-bin/koha/catalogue/search.pl?idx=kw&q=der&sort_by=relevance_dsc&limit=su-to:Zeitschrift (kw: der and limit to one of the topic subjects) It will work for items with the patch, but not for the regular URL field in the bibliographic record.
Created attachment 48486 [details] [review] [SIGNED OFF] Bug 14441 - TrackClicks cuts off/breaks URLs to test... 1/ set TrackClicks syspref to 'track' 2/ add a problematic multipart url to an item's 'url' field example url: http://foo.corg?key1=val1&key2=val2 3/ test url in opac-detail.pl - url is corrupt 4/ apply patch - url is corrct Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Only fixes the item URLs - a follow-up for the URLs in the bibliographic record (856 for MARC21) is still needed.
Fixing the URL encoding in the XSLT template is looking to be a lot harder, then fixing the problem in the templates :(
Created attachment 48501 [details] [review] Bug 14441: TrackClicks cuts off/breaks URLs (XSLT) Same test plan as previous patch, but for opac defail and result using the XSLT views.
Created attachment 48522 [details] [review] [SIGNED OFF] Bug 14441: TrackClicks cuts off/breaks URLs (XSLT) Same test plan as previous patch, but for opac defail and result using the XSLT views. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> I am amazed!
Created attachment 49556 [details] [review] Bug 14441 - TrackClicks cuts off/breaks URLs to test... 1/ set TrackClicks syspref to 'track' 2/ add a problematic multipart url to an item's 'url' field example url: http://foo.corg?key1=val1&key2=val2 3/ test url in opac-detail.pl - url is corrupt 4/ apply patch - url is corrct Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Only fixes the item URLs - a follow-up for the URLs in the bibliographic record (856 for MARC21) is still needed.
Created attachment 49557 [details] [review] Bug 14441: TrackClicks cuts off/breaks URLs (XSLT) Same test plan as previous patch, but for opac defail and result using the XSLT views. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> I am amazed!
Rebased - fixed conflict with the recent security fix in the first patch.
Pushed to Master - Should be in the May 2016 release. Thanks!
*** Bug 11528 has been marked as a duplicate of this bug. ***
Patches pushed to 3.22.x, will be in 3.22.6
Pushed to 3.20.x, will be in 3.20.11.