Bug 22915 - Cannot subscribe to Mana-KB
Summary: Cannot subscribe to Mana-KB
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Mana-kb (show other bugs)
Version: master
Hardware: All All
: P1 - high blocker (vote)
Assignee: Alex Arnaud
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-15 15:35 UTC by Martin Renvoize
Modified: 2019-06-27 09:24 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Who signed the patch off:
Text to go in the release notes:
This fix updates the Mana server URL in etc/koha-conf.xml so that it uses the correct URL - https://mana-kb.koha-community.org.
Version(s) released in:
19.11.00,19.05.01


Attachments
Error (118.51 KB, image/png)
2019-06-04 06:12 UTC, Martin Renvoize
Details
Bug 22915: fix Mana URL in etc/koha-conf.xml (819 bytes, patch)
2019-06-07 08:18 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 22915: fix Mana URL in etc/koha-conf.xml (891 bytes, patch)
2019-06-07 08:28 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-05-15 15:35:32 UTC
On entering my details into the initial setup screen I am faced with the following errors and do not receive the email described.

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 Brendan Gallagher 2019-05-29 19:48:30 UTC
Hey Martin - I just tried this out and it worked for me.  I did not receive that message.
Comment 2 Jonathan Druart 2019-05-29 22:06:36 UTC
Looks ok for me as well, however on the confirmation screen, I get:

Following information will be registered:
First Name:
Last Name:
E-Mail: 

(all empty)

https://ui.mana-kb.koha-community.org/registration?id=XXX


Then I confirm and get:

Error: seems like the token you try to activate (XXX) doesn't exist or is to old
Comment 3 Katrin Fischer 2019-05-30 06:59:00 UTC
Hi Jonathan, that's the same I got when testing bug 22210. Did you change your settings to test with the production server?
Comment 4 Jonathan Druart 2019-05-30 14:21:57 UTC
(In reply to Katrin Fischer from comment #3)
> Hi Jonathan, that's the same I got when testing bug 22210. Did you change
> your settings to test with the production server?

Nope, I was expecting prod and test to behave identically :)
Comment 5 Katrin Fischer 2019-05-30 14:34:56 UTC
(In reply to Jonathan Druart from comment #4)
> (In reply to Katrin Fischer from comment #3)
> > Hi Jonathan, that's the same I got when testing bug 22210. Did you change
> > your settings to test with the production server?
> 
> Nope, I was expecting prod and test to behave identically :)

They don't because of the organisational sign-up bug 22210.
Comment 6 Paul Poulain 2019-05-31 08:56:36 UTC
Regarding the "token does not exist" comment : 
The problem probably comes from the production & test server : until recently there was only one, even we the 2 URLs existed.
We've splitted them when the patch has been pushed. Thus, a token created on prod is no more known by test (and vice-versa). I'll ask Alex to have a look at it asap (he's in holiday for now)
Regarding the initial description, sorry martin, no idea :(
Comment 7 Martin Renvoize 2019-06-04 06:08:11 UTC
Perhaps I happened to hit the feature when the Mana server was down or something?
Comment 8 Martin Renvoize 2019-06-04 06:12:41 UTC
Created attachment 90304 [details]
Error

Afraid I do still see this error.. attaching a screenshot
Comment 9 Alex Arnaud 2019-06-06 07:50:41 UTC
(In reply to Martin Renvoize from comment #8)
> Created attachment 90304 [details]
> Error
> 
> Afraid I do still see this error.. attaching a screenshot

Martin,

URL is https://mana-kb... Not http://mana-kb.
switching to https should solve your problem.
Comment 10 Alex Arnaud 2019-06-06 07:53:33 UTC
(In reply to Jonathan Druart from comment #2)
> Looks ok for me as well, however on the confirmation screen, I get:
> 
> Following information will be registered:
> First Name:
> Last Name:
> E-Mail: 
> 
> (all empty)
> 
> https://ui.mana-kb.koha-community.org/registration?id=XXX
> 
> 
> Then I confirm and get:
> 
> Error: seems like the token you try to activate (XXX) doesn't exist or is to
> old

All ok for me.
Nothing empty and i get this confirmation message:
"E-mail successfuly validated, token xxxx is now active."

(on production server)
Comment 11 Alex Arnaud 2019-06-06 09:44:01 UTC
(In reply to Alex Arnaud from comment #10)
> (In reply to Jonathan Druart from comment #2)
> > Looks ok for me as well, however on the confirmation screen, I get:
> > 
> > Following information will be registered:
> > First Name:
> > Last Name:
> > E-Mail: 
> > 
> > (all empty)
> > 
> > https://ui.mana-kb.koha-community.org/registration?id=XXX
> > 
> > 
> > Then I confirm and get:
> > 
> > Error: seems like the token you try to activate (XXX) doesn't exist or is to
> > old
> 
> All ok for me.
> Nothing empty and i get this confirmation message:
> "E-mail successfuly validated, token xxxx is now active."
> 
> (on production server)

I got it!

Mana test server was set up with production URL. So you was registering on test and try to confirm it on production one (thx Katrin for the catch).
Comment 12 Martin Renvoize 2019-06-06 10:18:17 UTC
Aha, excellent.. it sounds like you found the issue.. I'll have a quick test and report back.
Comment 13 Martin Renvoize 2019-06-07 07:39:41 UTC
Right.. so it does work now as long as I change koha-conf to point to the https URL.

However.. I do still think there's a couple of bugs here.

Firstly: looking at master, 'etc/koha-conf.xml' which is used as part of the make process still points to 'http' so by default people using the make process to install will be getting an incorrect default config.

Secondly: The error here is meaningless.. we should be able to catch a bad URL earlier and give a much more meaningful error.. I wasn't sure whether it was the Mana service that was down, a Koha end bug or what.
Comment 14 Katrin Fischer 2019-06-07 07:51:35 UTC
Is there a reason we have the URL in koha-conf.xml? It might be nice to store it in a pref. But I might be missing something.
Comment 15 Alex Arnaud 2019-06-07 08:18:28 UTC
Created attachment 90409 [details] [review]
Bug 22915: fix Mana URL in etc/koha-conf.xml
Comment 16 Alex Arnaud 2019-06-07 08:21:04 UTC
(In reply to Katrin Fischer from comment #14)
> Is there a reason we have the URL in koha-conf.xml? It might be nice to
> store it in a pref. But I might be missing something.

1) IMO for consistency. All external backends/services URI are defined in koha-conf.xml (elasticsearch, pazpar2 etc...).

2) To prevent an other system preference :)
Comment 17 Alex Arnaud 2019-06-07 08:22:39 UTC
(In reply to Martin Renvoize from comment #13)
> Right.. so it does work now as long as I change koha-conf to point to the
> https URL.
> 
> However.. I do still think there's a couple of bugs here.
> 
> Firstly: looking at master, 'etc/koha-conf.xml' which is used as part of the
> make process still points to 'http' so by default people using the make
> process to install will be getting an incorrect default config.
Fixed in the attached patch
> 
> Secondly: The error here is meaningless.. we should be able to catch a bad
> URL earlier and give a much more meaningful error.. I wasn't sure whether it
> was the Mana service that was down, a Koha end bug or what.
Not a blocker for me. This can be done in a separate BZ
Comment 18 Martin Renvoize 2019-06-07 08:25:41 UTC
Thanks Alex, 

I'm game with that, the /etc/ fix is nice to have here and I'm not worried about it staying in koha-conf for now... (if we do end up with lots of mana servers hosted by the various support companies, my opinion on it being converted to a pref may change).

Also happy to have a nicer fix for the error message done in a distinct bug.
Comment 19 Martin Renvoize 2019-06-07 08:27:02 UTC
As a string patch I'm going to go straight for PQA here and push it :)
Comment 20 Martin Renvoize 2019-06-07 08:28:00 UTC
Created attachment 90410 [details] [review]
Bug 22915: fix Mana URL in etc/koha-conf.xml

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 21 Martin Renvoize 2019-06-07 08:28:41 UTC
Nice work!

Pushed to master for 19.11.00
Comment 22 Fridolin SOMERS 2019-06-11 15:24:23 UTC
Pushed to 19.05.x for 19.05.01