Forums

Custom Field Suite
[resolved] 1.0.5 JSON bug when inserting images (7 posts)

  1. texasguy911
    Member
    Posted 1 year ago #

    Seems like there is a JSON parse error (invalid char) when trying to insert an image. Went back to 1.0.4, now I can insert no problem again.

    Tried with Firefox and Chrome, seems like not a browser issue.

    The bug happens when you are in a media browser and click 'insert into post' the picture, the JS error happens (about JSON parse), the media browser box becomes white, nothing happens then.

    http://wordpress.org/extend/plugins/custom-field-suite/

  2. logikal16
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for reporting; I'll look into it.

  3. logikal16
    Member
    Plugin Author

    Posted 1 year ago #

    texasguy911, what version of WordPress are you currently on?

  4. texasguy911
    Member
    Posted 1 year ago #

    3.2.1

  5. logikal16
    Member
    Plugin Author

    Posted 1 year ago #

    Towards the top of /custom-field-suite/core/fields/file.php, try changing:

    add_filter('media_send_to_editor', array($this, 'media_send_to_editor'), 10, 3);

    To:
    add_filter('media_send_to_editor', array($this, 'media_send_to_editor'), 20, 3);

  6. texasguy911
    Member
    Posted 1 year ago #

    I'll try this in the evening at home where I have a sandbox to play with.

  7. texasguy911
    Member
    Posted 1 year ago #

    The change did fix it. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic