WordPress.org

Ready to get started?Download WordPress

Forums

Magic Fields 2
[resolved] Image Media field not working after updating to WP 3.6 (21 posts)

  1. robthedog
    Member
    Posted 1 year ago #

    Hello; After updating to WP 3.6 image media fields are not updating once an image is uploaded or selected from the media library.

    All looks as if it's working normally except that the "Insert into field" button has reverted to "Insert into post" and when clicked the image media field remains empty.

    Tried on several sites over two servers and the result is the same after updating to WP 3.6 from 3.5.

    Any help gratefully received...

    http://wordpress.org/plugins/magic-fields-2/

  2. meln
    Member
    Posted 1 year ago #

    Same problem here.

    Any chance you found a solution?

  3. another13
    Member
    Posted 1 year ago #

    For Mafic Fields 2, in magic-fields-2/field_types/image_media_field/image_media_field.php.

    After:
    $out .= sprintf('%s',$field['input_id'],$link,__('Set Image',$mf_domain));

    Add:
    $out .= "<script>
    jQuery('a#thumb_".$field['input_id']."').click( function(){
    window.mf_field_id = jQuery(this).attr('id');
    });
    </script>";

    It work for me. :)

  4. robthedog
    Member
    Posted 1 year ago #

    @another13 brilliant, thanks. I just added your snippet of code before the

    return $out;

    Around line 112 So now looks like:

    $out .= '</div></div>';
        $out .= '</div>';
    
    	$out .= "<script>
    jQuery('a#thumb_".$field['input_id']."').click( function(){
    window.mf_field_id = jQuery(this).attr('id');
    });
    </script>";
    
        return $out;
  5. meln
    Member
    Posted 1 year ago #

    Works like a charm thank you

  6. jakobmichaelis
    Member
    Posted 1 year ago #

    Confirmed working. Thanks another13!

  7. Jake Love
    Member
    Posted 1 year ago #

    Oh my gosh!! This SAVED MY BACON! Thank you so much!!!!

  8. Jake Love
    Member
    Posted 1 year ago #

    So I'm seeing this work one moment and then not the other for some reason.. Has anyone else been having this same behavior?

    Really appreciate the assistance!

    Thanks,
    Jake

  9. CREATEEN
    Member
    Posted 1 year ago #

    To another13 : Thanks man
    No need to wait for updating ;)

  10. hunk
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, the problem in this is MF for image_field uses live of jquery, but jquery remove this function in 1.7. so never enter in the correct function. for fix this change this line ~237 in file js/mf_admin.js

    $('.update_field_media_upload').live('click', function(){

    for this

    $('.update_field_media_upload').on('click', function(){

    I'm changing all. live and soon will put a new version of MF

  11. hunk
    Member
    Plugin Author

    Posted 1 year ago #

    I updated the 2.2 version which corrects this

  12. DownHouse00
    Member
    Posted 9 months ago #

    Don't work in 2.2 too

  13. wp_juan
    Member
    Posted 9 months ago #

    Hi,
    Does anybody could fix this issue in WP 3.7 and MF 2.2?
    Thanks.

  14. wp_juan
    Member
    Posted 9 months ago #

    Extending issue description.

    "Insert into Field" button has changed to "Insert into Post" and image is inserted into post field instead of being inserted in media field.

    If no post field is set in cpt, when you click "Insert into post" button a blank page is shown inside iframe, and no image is inserted in media field.

    Thanks

  15. Manuel Razzari
    Member
    Posted 9 months ago #

    I'm having the same problem, specifically with the "Image Media" field type, not the regular Image field.

    Any workarounds?

  16. esmi
    Forum Moderator
    Posted 9 months ago #

    @ManuelRazzari: If you require assistance then, as per the Forum Welcome, please post your own topic.

  17. Jake Love
    Member
    Posted 9 months ago #

    I just confirmed this IS working for me with WordPress 3.7.1 & Magic Fields 2.2. It does say "Insert Into Post", however it inserts it correctly within the image field.

    No problems here.

  18. Manuel Razzari
    Member
    Posted 9 months ago #

    Hello Jake, have you disabled the built-in WP RTE on your custom post type?

    This is our case, and it seems some required libs just don't load without the default RTE in there...

  19. Jake Love
    Member
    Posted 9 months ago #

    The Rich Text Editor that I use and recommend is TinyMCE Advanced. It doesn't have any issues with Magic Fields 2.2.

  20. Quasimodo84
    Member
    Posted 8 months ago #

    OMFG thank you!!!

  21. waltermblair
    Member
    Posted 7 months ago #


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic