WPBadger icon indicating copy to clipboard operation
WPBadger copied to clipboard

Could not parse the undefined file at undefined file

Open mikehawke opened this issue 11 years ago • 25 comments

Hi, I'm encountering a few problems issuing a badge through the plugin. I try to award a badge to myself and get the error "We have encountered the following problem: Could not parse the undefined file at undefined file" this comes after clicking the "Hoorah!" button. I can award the badge ok through badge.us.

Really excited to use this functionality! Thanks for your support. Mike.

mikehawke avatar Mar 22 '13 10:03 mikehawke

I am experiencing this same issue.

liquidgenius avatar Mar 27 '13 18:03 liquidgenius

Me three.

http://keenecommons.net/badges/awards/1239356037

Screen shot 2013-04-16 at 3 01 48 PM

ivyroberts avatar Apr 16 '13 19:04 ivyroberts

Hi ivyroberts! Try to change description of your to award to fit in one line.

As you can see on http://keenecommons.net/badges/awards/1239356037/json/ - your description contains new line.

jiripavlicek avatar Apr 16 '13 19:04 jiripavlicek

Wow! Thank you.

ivyroberts avatar Apr 16 '13 20:04 ivyroberts

I'm getting this same issue. It doesn't matter how short/long my description is, or how many lines it takes up. I still get the error returned.

tylerjohnson avatar Apr 17 '13 22:04 tylerjohnson

Ack. I too am getting the error. (using PHP gadget-badge-it-lite) What is odd is that I've got two test sites with a bit different settings. One site is working and the other isn't. The settings in both are slightly different, but I can't identify the problem. I'm pooring through all of the http references in the assertion (the output I've created it in php), the badgeClass.json and the organization.json. All http references are available, so not sure what I may have missed.

Better error messaging might help.... such as what the undefined file might be trying to reference.

Update: The problem was eventually solved by removing all .htaccess coverage from the entire site. This probably seems obvious but the site seems quite vulnerable currently.

pbamma avatar May 09 '13 01:05 pbamma

I'm seeing the same thing, just to add to the chorus. Doesn't matter how long my description is.

mrjarbenne avatar May 22 '13 20:05 mrjarbenne

@pbamma I've got the same problem: my test site works; the one we want to issue badges from doesn't. :(

jducl avatar Jun 05 '13 16:06 jducl

@jducl @mrjarbenne: just seeing your recent posts on this thread. if you can share the link to your award, I can take a look at the assertion file it generates to see where it's breaking.

davelester avatar Jun 05 '13 16:06 davelester

ping?

davelester avatar Jun 30 '13 18:06 davelester

I'm also getting the same error on my sites. You may want to look into updating the JQuery version you are using in the plugin.

chrismartello avatar Sep 09 '13 15:09 chrismartello

By following all my links I found an invalid url. Please check yours ^

doomedramen avatar Sep 09 '13 15:09 doomedramen

You can only have 128 characters.

WBKitty avatar Sep 19 '13 01:09 WBKitty

My Name only has 10 characters

chrismartello avatar Sep 19 '13 11:09 chrismartello

Sorry--more info needed. 128 characters in the description. AND I discovered that you need to have a version number. Can't just leave it blank. Let me know if this works for you?

WBKitty avatar Sep 19 '13 15:09 WBKitty

I'm having the same issue.

I discovered that the full URL in the "criteria" section of my json file returns a missing 404 page (can't be found by WordPress). For example, WordPress can't find my http://www.mysite.com/badges/badgename".

In my case, I tried to add a new Badge named "Video Badge". WordPress created a Permalink: http://www.mysite.com/badges/video-badge". However, when I tried to view this page, it comes up as a 404 "can't find page. This is the same URL that is added to the criteria section of the json file. Therefore, I believe this is why I'm getting the error and not completing the backpack process.

Can anyone suggest a fix. Thanks!!

davidmcoleman avatar Sep 29 '13 21:09 davidmcoleman

Update: I fixed my issue. First, I added "1" as the version number. This caused a validation error. I changed it to "1.0" and it worked. Second, my WP site was password protected with the plugin "Private Community For BP". So, the link to the json file, http://mysite.com/awards/1437347421/?json=1 was prompting a login or register window. Once I disabled the "Private Community For BP" plugin, the accept badge process finally worked without the "undefined file at undefined file" error.

Q: Can WPBadger work within a password protected WP site??

Thanks.

davidmcoleman avatar Sep 29 '13 23:09 davidmcoleman

I'm having the same difficulty. When I create a new badge with little or no description it works fine, but all of these older badges with longer descriptions are not working. I tried to reissue the badge with a shorter description but it still does not work.

dendari avatar Sep 30 '13 16:09 dendari

Diddo.

What tools exist for ensuring that the badge created is a valid open badge?

cmorezebras avatar Oct 16 '13 21:10 cmorezebras

Hi,

I just setup the latest version of Wordpress on my Windows 2008 R2 server and have enabled the plugin but having the same issue with accepting the badges so it shows on the Mozilla bagpack. Is there a fix for this?

We have encountered the following problem: Could not parse the undefined file at undefined file

mariofishery avatar Nov 29 '13 05:11 mariofishery

I'm having this same issue. Has anyone figured out the problem?

chazyvr avatar Mar 24 '14 19:03 chazyvr

Try validating your badge assertion file (JSON) in the OpenBadges validator: http://validator.openbadges.org/

To access the assertion file, simply add "json/" to your badge award url, for example if your award url was http://example.com/awards/123456789/, your assertion file url would be http://example.com/awards/123456789/

davelester avatar Mar 24 '14 20:03 davelester

I made sure everything was 128 characters or fewer before posting here. I also installed .7 version from GitHub rather than Wordpress. I've also changed permalinks to default and then changed back.

What if the validator says it's invalid? Where could the problem be?

chazyvr avatar Mar 25 '14 01:03 chazyvr

Dear Chaz,

Which domain are you using for issuing badges and also are you using a sub domain by any chance?

Best Regards,

Mario Fishery

From: chazyvr [mailto:[email protected]] Sent: Tuesday, March 25, 2014 7:23 AM To: davelester/WPBadger Cc: Fishery, Mario Subject: Re: [WPBadger] Could not parse the undefined file at undefined file (#50)

I made sure everything was 128 characters or fewer before posting here. I also installed .7 version from GitHub rather than Wordpress. I've also changed permalinks to default and then changed back.

What if the validator says it's invalid? Where could the problem be?

— Reply to this email directly or view it on GitHubhttps://github.com/davelester/WPBadger/issues/50#issuecomment-38523074.

mariofishery avatar Mar 25 '14 02:03 mariofishery

If it's possible to share the link to the publicly, maybe folks on this thread can help you debug.

davelester avatar Mar 25 '14 06:03 davelester