davelester / WPBadger

A lightweight badge issuing platform built using WordPress
Other
43 stars 13 forks source link

Unable to claim badge award, path to JSON seems incorrect #19

Closed lmorchard closed 12 years ago

lmorchard commented 12 years ago

I created a badge, then created an award for myself.

The layout on the award page is a little off, probably an interaction with my theme. But, way down at the bottom there's an "accept badge" link. But, when I click it, I eventually get this message from the OBI backpack:

We have encountered the following problem: trying to grab url http://blog.lmorchard.com/awards/9610296json/ got error UnreachableError: Unable to retrieve assertion from the following url: http://blog.lmorchard.com/awards/9610296json/

If I stick a slash in before json/, I can fetch the assertion. It's missing most of the badge data, but not sure if that has anything to do with the awarding issue.

davelester commented 12 years ago

I haven't experienced any problems with retrieving the assertion, and you're right it should be available by adding the slash. My guess is that the permalink rules for your WordPress blog does not include a trailing slash.. and WPBadger assumed it would. (bad assumption!) If this isn't the case, then we'll need to keep searching.

I'm not sure if the badge data issue is related.. perhaps the badge object is incorrectly being retrieved? I'll dig into the code and update this later.

lmorchard commented 12 years ago

Yeah, I don't tend to enable trailing-slashes on my blog. My URL-space has been through a number of different blogging engines, and no-trailing-slashes has tended to be the most compatible between them for preserving links.

Or, at least, that was the case with decafbad.com - blog.lmorchard.com is relatively new

davelester commented 12 years ago

Fixed with commit 4db19bc52184a644c4a7b6e99128e17a045582ab