[Bug 30262] New: opac/tracklinks.pl inconsistent with GetMarcUrls for whitespace
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Bug ID: 30262 Summary: opac/tracklinks.pl inconsistent with GetMarcUrls for whitespace Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org C4::Biblio::GetMarcUrls will trim whitespace from URLs but opac/tracklinks.pl does not. This means that valid URLs with extra whitespace will fail validation when they should pass validation. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 131534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131534&action=edit Bug 30262: Trim whitespace off tracklinks.pl URLs This patch trims whitespace off tracklinks.pl URLs so that the URL is in the same format as the URLs returned by C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0 3. Save record 4. Change 'TrackClicks' syspref to 'Track' 5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 6. Click on the online resource (eg http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29 ) 7. Note you are redirected to https://koha-community.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131534|0 |1 is obsolete| | --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 139815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139815&action=edit Bug 30262: Trim whitespace off tracklinks.pl URLs This patch trims whitespace off tracklinks.pl URLs so that the URL is in the same format as the URLs returned by C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0 3. Save record 4. Change 'TrackClicks' syspref to 'Track' 5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 6. Click on the online resource (eg http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29 ) 7. Note you are redirected to https://koha-community.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139815|0 |1 is obsolete| | --- Comment #3 from Magnus Enger <magnus@libriotech.no> --- Created attachment 139817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139817&action=edit Bug 30262: Trim whitespace off tracklinks.pl URLs This patch trims whitespace off tracklinks.pl URLs so that the URL is in the same format as the URLs returned by C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0 3. Save record 4. Change 'TrackClicks' syspref to 'Track' 5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 6. Click on the online resource (eg http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29 ) 7. Note you are redirected to https://koha-community.org Signed-off-by: Magnus Enger <magnus@libriotech.no> Added the link with a space at the end. Verified that without the patch, clickin on "Click here to access online" gives a 404. After applying the patch the redirect works as expected. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139817|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 139909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139909&action=edit Bug 30262: Trim whitespace off tracklinks.pl URLs This patch trims whitespace off tracklinks.pl URLs so that the URL is in the same format as the URLs returned by C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally. Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0 3. Save record 4. Change 'TrackClicks' syspref to 'Track' 5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 6. Click on the online resource (eg http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29 ) 7. Note you are redirected to https://koha-community.org Signed-off-by: Magnus Enger <magnus@libriotech.no> Added the link with a space at the end. Verified that without the patch, clickin on "Click here to access online" gives a 404. After applying the patch the redirect works as expected. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 CC| |arthur.suzuki@biblibre.com --- Comment #7 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11.x for 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org