Bug 16031 - sitemap.pl shouldn't append protocol to OPACBaseURL
Summary: sitemap.pl shouldn't append protocol to OPACBaseURL
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 5010 11190
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 18:39 UTC by Tomás Cohen Arazi
Modified: 2017-06-14 22:05 UTC (History)
5 users (show)

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


Attachments
Bug 16031: sitemap.pl shouldn't append protocol to OPACBaseURL (1.24 KB, patch)
2016-03-09 18:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16031: (followup) Fix documentation (772 bytes, patch)
2016-03-09 18:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16031: sitemap.pl shouldn't append protocol to OPACBaseURL (1.30 KB, patch)
2016-03-09 20:08 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16031: (followup) Fix documentation (838 bytes, patch)
2016-03-09 20:08 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16031: sitemap.pl shouldn't append protocol to OPACBaseURL (1.36 KB, patch)
2016-03-10 12:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16031: (followup) Fix documentation (899 bytes, patch)
2016-03-10 12:32 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2016-03-09 18:39:43 UTC
Right now, the script appends a fixed protocol (HTTP) to the generated URL. This is because the tool was written before bug 5010 was pushed.

To reproduce:
- Have OPACBaseURL set
- Run the script (without the --url parameter)
=> FAIL: Notice the generated sitemap files contain double protocol specification on the URLs (like in http://http:// or http://https://)
Comment 1 Tomás Cohen Arazi 2016-03-09 18:48:15 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2016-03-09 18:48:20 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2016-03-09 20:08:13 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2016-03-09 20:08:58 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-03-10 12:32:28 UTC
Created attachment 48952 [details] [review]
Bug 16031: sitemap.pl shouldn't append protocol to OPACBaseURL

Since bug 5010 was pushed, OPACBaseURL already contains the protocol. The
sitemap.pl script was written before this was pushed, and thus still concatenates
http:// in front of OPACBaseURL.

This patch removes this behaviour.

To test:
- Have OPACBaseURL set to (say) http://myopac.com
- Run the sitemap.pl script without specifying the --url param
=> FAIL: Notice URLs look like http://http://myopac.com/bib... in the sitemap files.
- Apply the patch
- Run the sitemap.pl script without specifying the --url param
=> SUCCESS: Notice URLs look correctly like http://myopac.com/bib...
- Sign off :-D

Regards

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2016-03-10 12:32:33 UTC
Created attachment 48953 [details] [review]
Bug 16031: (followup) Fix documentation

This followup fixes a tiny mistake in the script POD.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Brendan Gallagher 2016-03-11 15:29:51 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks
Comment 8 Julian Maurice 2016-03-14 09:30:54 UTC
Patches pushed to 3.22.x, will be in 3.22.5