wordpress 3.0 json issue

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.

Read More

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

http://wordpress.org/extend/plugins/media-finder/

here is the screen shot of the error in the plugin

http://imgur.com/RFGXm.jpg

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);

Related posts

Leave a Reply

1 comment

  1. When I comment out the line:

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

    it works for me

    p.s.

    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.