Bug 23130 - Incorrect alternative mana server URL in etc/koha-conf.xml
Summary: Incorrect alternative mana server URL in etc/koha-conf.xml
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Mana-kb (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: David Nind
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-15 01:39 UTC by David Nind
Modified: 2019-07-15 13:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
This fix updates the alternative Mana KB server URL in etc/koha-conf.xml to https://mana-test.koha-community.org. If the updated URL is used the account creation request is successful and doesn't cause any error messages.
Version(s) released in:
19.11.00,19.05.02


Attachments
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml (2.80 KB, patch)
2019-06-15 03:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml (2.86 KB, patch)
2019-06-17 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml (2.92 KB, patch)
2019-06-19 12:31 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2019-06-15 01:39:25 UTC
The commented out alternative mana KB server URL included in etc/koha-conf.xml is not correct.

If it is used it generates an error message when submitting an account creation request, and the account creation request fails.

Error message: 'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.'
Comment 1 David Nind 2019-06-15 01:40:43 UTC
The URL should start with https instead of http:
- Current URL: <!-- alternative value http://mana-test.koha-community.org to query the test server -->
- Corrected URL: <!-- alternative value https://mana-test.koha-community.org to query the test server -->

To replicate the issue:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml in the Koha code repository for an example of where to add this; <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha instance configuration are recognised (if using koha-testing-docker run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration > Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to Yes and press Save.
5) Enter your first name, last name and email address in the Configure Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like 'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.'.
7) Change the mana server URL to https://mana-test.koha-community.org (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created your Mana KB account. Check your mailbox and follow instructions.'
Comment 2 David Nind 2019-06-15 03:00:40 UTC
Created attachment 90635 [details] [review]
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml

If the alternative mana KB server URL in etc/koha-conf.xml is used it
causes an error message like 'malformed JSON string, neither tag,
array, object, number, string or atom, at character offset 0 (before
"<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' when
submitting an account creation request, and the account creation
request fails.

This patch updates the alternative mana KB server URL in
etc/koha-conf.xml from http://mana-test.koha-community.org to
https://mana-test.koha-community.org (the URL should start with https
instead of http). If the updated URL is used the account creation
request succeeds without causing any error messages.

To test:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to
   /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml
   in the Koha code repository for an example of where to add this;
   <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha
   instance configuration are recognised (if using koha-testing-docker
   run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration >
   Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to
   Yes and press Save.
5) Enter your first name, last name and email address in the Configure
   Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like:
   'malformed JSON string, neither tag, array, object, number, string
   or atom, at character offset 0 (before "<html>\r\n<head><tit...") at
   /usr/share/perl5/JSON.pm line 171.'
7) Change the mana server URL to https://mana-test.koha-community.org
   (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created
   your Mana KB account. Check your mailbox and follow instructions.'
Comment 3 Katrin Fischer 2019-06-17 22:06:01 UTC
Created attachment 90707 [details] [review]
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml

If the alternative mana KB server URL in etc/koha-conf.xml is used it
causes an error message like 'malformed JSON string, neither tag,
array, object, number, string or atom, at character offset 0 (before
"<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' when
submitting an account creation request, and the account creation
request fails.

This patch updates the alternative mana KB server URL in
etc/koha-conf.xml from http://mana-test.koha-community.org to
https://mana-test.koha-community.org (the URL should start with https
instead of http). If the updated URL is used the account creation
request succeeds without causing any error messages.

To test:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to
   /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml
   in the Koha code repository for an example of where to add this;
   <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha
   instance configuration are recognised (if using koha-testing-docker
   run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration >
   Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to
   Yes and press Save.
5) Enter your first name, last name and email address in the Configure
   Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like:
   'malformed JSON string, neither tag, array, object, number, string
   or atom, at character offset 0 (before "<html>\r\n<head><tit...") at
   /usr/share/perl5/JSON.pm line 171.'
7) Change the mana server URL to https://mana-test.koha-community.org
   (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created
   your Mana KB account. Check your mailbox and follow instructions.'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2019-06-17 22:06:31 UTC
It appears that http: now forwards to https:, but it's still nice to have this!
Comment 5 Julian Maurice 2019-06-19 12:31:26 UTC
Created attachment 90784 [details] [review]
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml

If the alternative mana KB server URL in etc/koha-conf.xml is used it
causes an error message like 'malformed JSON string, neither tag,
array, object, number, string or atom, at character offset 0 (before
"<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' when
submitting an account creation request, and the account creation
request fails.

This patch updates the alternative mana KB server URL in
etc/koha-conf.xml from http://mana-test.koha-community.org to
https://mana-test.koha-community.org (the URL should start with https
instead of http). If the updated URL is used the account creation
request succeeds without causing any error messages.

To test:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to
   /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml
   in the Koha code repository for an example of where to add this;
   <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha
   instance configuration are recognised (if using koha-testing-docker
   run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration >
   Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to
   Yes and press Save.
5) Enter your first name, last name and email address in the Configure
   Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like:
   'malformed JSON string, neither tag, array, object, number, string
   or atom, at character offset 0 (before "<html>\r\n<head><tit...") at
   /usr/share/perl5/JSON.pm line 171.'
7) Change the mana server URL to https://mana-test.koha-community.org
   (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created
   your Mana KB account. Check your mailbox and follow instructions.'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 6 Martin Renvoize 2019-06-20 08:33:57 UTC
Nice work!

Pushed to master for 19.11.00
Comment 7 Martin Renvoize 2019-06-20 08:56:38 UTC
Congratulations on your first patch David, it's great to have you aboard :)
Comment 8 Fridolin SOMERS 2019-07-15 13:29:44 UTC
Pushed to 19.05.x for 19.05.02