davelester / WPBadger

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

JSON error trying to post to Open Badge Backpack #44

Closed johnnsb closed 11 years ago

johnnsb commented 11 years ago

I just set up a new WP instance, running off dyndns for now, and (gratefully and humbly) stumbed on your plugin. Set up a badge, added one award, sent email. When user chooses to accept the award, and goes to their Open Badge Backpack, they get the following error:

badge_error

Only tested on Chrome so far.

John

davelester commented 11 years ago

I followed the link included in the screenshot, and it appears that the award has since been deleted or made private. What I usually do during similar instances is first eyeball the json file that the plugin generates to see if any anomalies stand out, and I also run the file through the Open Badges validator to identify what is making the assertion invalid.

Could you create a new award and share the link here, or try validating the assertion file yourself? We should be able to get to the bottom of the issue.

jamesmichie commented 11 years ago

I am also having the same problem, running the Twenty Eleven theme. Image attached.

WPBadger JSON Error

davelester commented 11 years ago

James,

In the case of your award, it looks like you've included HTML in your badge description. Try updating the description to be 128 characters or less, without HTML.

jamesmichie commented 11 years ago

Does the badge description count as the 'meta-data'? If not how do I edit the meta-data?

And thanks for your speedy response by the way. :-)


James Michie

@jamesmichie (http://twitter.com/jamesmichie)

http://jamesmichie.com (http://jamesmichie.com/)

On Monday, 7 January 2013 at 20:21, Dave Lester wrote:

James, In the case of your award, it looks like you've included HTML in your badge description. Try updating the description to be 128 characters or less, without HTML.

— Reply to this email directly or view it on GitHub (https://github.com/davelester/WPBadger/issues/44#issuecomment-11969550).

jamesmichie commented 11 years ago

Edited badge description. Still having same issue.

davelester commented 11 years ago

@jamesmichie: can you share the award url? I'll take a closer look at its JSON assertion file.

jamesmichie commented 11 years ago

http://jamesmichie.com/criticalskills/awards/702621670998632

davelester commented 11 years ago

Very minor, but it looks like there's a newline following your badge description that's making the assertion file invalid. Try removing that, and it should work.

jamesmichie commented 11 years ago

Brilliant! Sorted.

Is there a way to display the badge itself on the badge page?

At the moment I get this, even though I have set the featured image: http://jamesmichie.com/criticalskills/badges/research-and-enquiry/

And thanks for the help, much appreciated. :-)


James Michie

@jamesmichie (http://twitter.com/jamesmichie)

http://jamesmichie.com (http://jamesmichie.com/)

On Monday, 7 January 2013 at 20:46, Dave Lester wrote:

Very minor, but it looks like there's a newline following your badge description that's making the assertion file invalid. Try removing that, and it should work.

— Reply to this email directly or view it on GitHub (https://github.com/davelester/WPBadger/issues/44#issuecomment-11970812).

davelester commented 11 years ago

Not yet, but there's a ticket already online to add this in the future, #38.

jamesmichie commented 11 years ago

Okay, that's great.

Thanks for all your help. I added myself to the list of people using WPBadger. :-)


James Michie

@jamesmichie (http://twitter.com/jamesmichie)

http://jamesmichie.com (http://jamesmichie.com/)

On Monday, 7 January 2013 at 20:54, Dave Lester wrote:

Not yet, but there's a ticket already online to add this in the future, #38 (https://github.com/davelester/WPBadger/issues/38).

— Reply to this email directly or view it on GitHub (https://github.com/davelester/WPBadger/issues/44#issuecomment-11971169).

davelester commented 11 years ago

This JSON error occurs for a variety of reasons related to incorrect inputs.

I'm closing this ticket, since this will continue to be improved and prevented with future commits to add validation to badges and awards.