Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

by Ken Task -
Number of replies: 4
Picture of Particularly helpful Moodlers

and after turning on web services and creating a token for the two admin users that might need to update attempting the update renders this error:

An error occured during registration, please try again later. (Invalid token - token not found | ERRORCODE: invalidtoken)

which sounds like I've not done something on my end.

HUB: http://moodle.tcea.org/moodle2/moodle/ (site is not https ... is that required now?)

Have upgraded it via 'Moodle March' and it is now a 2.7.5+ (Build: 20150219) ... soon to be a 2.8.highest.

Do have moodleorgca.crt in moodledata of the site

Comment: for a while there, it was the ONLY other HUB listed at Moodle.org ... and still might be the ONLY K12 focused HUB in the entire USA!   I'd like to get it working again. ;)

Thanks, in advance, for any assistance anyone could offer.

'spirit of sharing', Ken

Average of ratings: -
In reply to Ken Task

Re: Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello Ken - did this work for you eventually? I can see your site on Moodle.net and it says modified on 19th February. 

In reply to Mary Cooch

Re: Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks for checking and reply ... Not sure that I have ...

When searching the HUB server, @ http://hubdirectory.moodle.org/
cannot find when using "TCEA Moodle 2" which is the name on the registration
form on my end.

Hub local plugin:
Thursday, 8 December 2011 (2011081200)

And there is no updates available when checking.

In Site Admin -> Plugins -> Web Services -> External Services
http://site/moodle/admin/settings.php?section=externalservices

List

Hub directory     local_hub     Functions     Authorised users
Moodle mobile web service     moodle     Functions     All users
Public site     local_hub     Functions     Authorised users
Registered site     local_hub     Functions     Authorised users

I've checked functions and they look ok but have no real docs on what they actually
mean/do.  The Authorized users link for Hub Directory shows:
hubdirectory.moodle.org_directory_user and public_hub_user are authorized.
 
For Public Site ... shows only public_hub_user authorized

1718 users authorized
Some like:

http://117.###.###.##/mymoodle_registered_site_user DO NOT DELETE OR MODIFY THIS USER !,

Can re-call deciding that IF a registration used an IP address I'd not approve/trust.
Many of those listed only 1 course, 1 user, ... etc..

Did generate a token on my end for
public_hub_user and for hubdirectory.moodle.org_directory_user

Yet, when I go to HUB Registration
I see the Hub details ... and all that looks ok/correct.
When I click the link to Update

An error occured during registration, please try again later. (Invalid token - token not found | ERRORCODE: invalidtoken)

Ken


In reply to Ken Task

Re: Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

by Andrew Davis -

Hi Ken,

Just to be clear you are running into this token not found problem when registering your hub (local/hub/admin/register.php) and not talking about trying to register a site with a hub (admin/registration/register.php). Is that correct?


Assuming that is correct can you verify what is in the hub_communications table? Specifically you are looking for a row that fits this criteria.

type == server

remoteentity == hubdirectory

remoteurl == http://hubdirectory.moodle.org

Do you have a row in hub_communication fitting that criteria? If so is there something sensible looking in the token column? ie its not empty or something.

It doesn't seem like a good idea to actually post that token in this forum but hopefully you can let me know if you have something that appears token-like in there.

Also, do you get any more information if you have debugging turned on on the site that is encountering this problem?
In reply to Andrew Davis

Re: Trying to update a Moodle 2 Hub registration with moodle.org ... error ...

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks for reply ...

hub_communications

1 server [token] hubdirectory http://hubdirectory.moodle.org Moodle.org hub directory 1 0
2 client [token] hubdirectory http://hubdirectory.moodle.org Moodle.org hub directory 1 0

The tokens look to be the same length (number of characters) as others seen in the table.

With debugging on:

An error occured during registration, please try again later. (Invalid token - token not found | ERRORCODE: invalidtoken)

which is the same error seen without debugging on.

No errors in any other logs of server.

Should I remove the tokens?

'spirit of sharing', Ken