im using the media finder plugin which works fine in 2.9 wordpress, but since the 3.0 wordpress, the json sans eval library which the plugin uses works no more.

not sure what was involved in the upgrade from 2.9 to 3.0 core wise with json.

here is a screenshot what firebug in firefox spits out, the actual json is parsed, but its not displayed. (media finder lets you search vid the media manager in your post)

so since json eval sans is non validating, not sure if wp 3.0 doesnt like that.

here is the url to the plugin


here is the screen shot of the error in the plugin


anyone can assist would be a life saver, or even what is involved in converting the code from json sans eval to json2.js which wp is packed with now

the code that would need to be converted to json2 would be the line

xhr = $.post(ajaxurl, params, function(data) {

data = jsonParse(data);

1 Answer 1


When I comment out the line:

@header('Content-type: application/json; charset=UTF-8');

it works for me


  1. there is also a closing php opening tag in it without the word php
  2. there is a closing php tag at the bottom which can be gone
  3. there is a notice on an undefined index.
  4. better would be to use $charset = get_option('blog_charset');

I have no idea if this: http://wordpress.org/support/topic/plugin-json-api-content-length-header has something do with it, or this: http://core.trac.wordpress.org/ticket/11537 or this: http://wordpress.org/support/topic/wordpress-gone-wild?replies=3 , did not dive in it.

  • 1
    just noticing, as it might be irritating: "there is also a closing php tag in it without the word php" -> closing php tags never have the word php in there. it#s just ?>
    – hakre
    Commented Nov 17, 2010 at 22:29
  • 1
    sorry... opening tag I ment (the second line confused me), check the code of the plugin (noticed it because it failed to run on my server, had to add "php")
    – edelwater
    Commented Nov 17, 2010 at 23:46
  • 1
    wow, well this something the plugin author should fix. it's something everybody of us should do for shared code: add the php in opening tags as the short version (w/o php) does not run on every server. This is really something the plugin author should be noticed about.
    – hakre
    Commented Nov 18, 2010 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.