iamntz
(Ionuț Staicu)
2015 年 2 月 23 日午前 7:55
1
Hi guys. I’m having this set-up:
one site that manages authentification (WP1) for discourse. The forum is set to not accept other users than those that are coming from this WP1
multiple sites (WPx) are trying to post their latest posts on discourse.
I get no error when i try to post, yet the posts doesn’t shows up on Discourse
This is what I get on logs:
Can't verify CSRF token authenticity
Discourse::InvalidAccess (Discourse::InvalidAccess)
Tried to regenerate api keys, but with no luck. Also i tried to make a request with Postman and I get the same errors on logs, but postman also shows me a 500 error (with no extra details).
Am I doing something wrong? Thanks!
(i’m on latest versions of wp, discourse, plugin, all).
sigurdur
(Sigurður Guðbrandsson)
2015 年 2 月 23 日午後 4:26
2
What happens when you post from the wordpress that does the authentication?
iamntz
(Ionuț Staicu)
2015 年 2 月 23 日午後 5:19
3
Absolutely the same thing: nothing
sigurdur
(Sigurður Guðbrandsson)
2015 年 2 月 23 日午後 5:48
4
Then you have a problem with your API communication.
Did you copy the correct API key to wordpress?
Did you configure the Discourse plugin correctly? (correct user)
iamntz
(Ionuț Staicu)
2015 年 2 月 23 日午後 5:54
5
Actually… I may be dumb.
It seems that the API key had a space at the end. Now everything seems fine!
Thanks!
「いいね!」 1
Hmm can we check for extra spaces in the API key @techapj and strip them? If this is an easy fix in an easy place let’s make it so.
iamntz
(Ionuț Staicu)
2015 年 2 月 24 日午前 5:25
7
I’ll probably send a couple of PRs by myself, including this quick fix
「いいね!」 3
benword
(Ben Word)
2015 年 2 月 25 日午前 2:43
8
Thanks for those pull reqs — all merged!
「いいね!」 4