Support » Plugins and Hacks » [Plugin: Magic Fields 2] 'Insert into Post' changes to 'Insert into field'

[Plugin: Magic Fields 2] 'Insert into Post' changes to 'Insert into field'

  • Hi. I discovered this plugin before Christmas and had a little play with it, and was quite excited.

    However, I’ve noticed today that when inserting an image into a post via the Media dialogue box, the ‘Insert into Post’ button has disappeared, and has been replaced with ‘Insert into field’, making it impossible to add the images.

    I deactivated all plugins except Magic Fields 2, but the problem persists.

    I have a couple of screenshots, but don’t know how to insert them into the forum.




Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same issue… and noticed it a while ago. I was hoping it would be fixed by now. Any update on this?

    Many thanks.

    My fix:
    (Not totally tested, but it will probably get you quite a bit along the way)

    1. create a copy of mf_admin.js called mf_media.js
      1. in mf_media.js keep only the load_link_in_media_upload function and the jQuery function after //load button for image media
      2. in mf_admin.js get rid of these to pieces of code
    2. in main.php add the following lines of code after line 193
      if( isset($_GET['mf_action']) && $_GET['mf_action'] == 'media_upload' ) {
            	wp_enqueue_script( 'mf_media',MF_BASENAME.'js/mf_media.js', array( 'jquery.validate', 'jquery.metadata', 'jquery' ) );
    3. in image_media_field.php change line 111 to $link = sprintf('media-upload.php?post_id=0&type=image&mf_action=media_upload&TB_iframe=1');

    A quick explanation of what is going on.

    For whatever reason MagicFields-2 was loading its js on all admin pages, so when you load the media uploader it modifies the Insert button with jQuery.

    By changing image_media_field.php you add an mf_action to the get string when MagicFields calls the media uploader.

    By changing main.php you enqueue the javascript (mf_media.js now) that changes the upload form only if the
    the mf_action=media_upload is set.

    Plugin Author hunk


    Hi, you can update a devel version https://github.com/magic-fields-team/Magic-Fields-2 and tell me if work fine for update this version in wordpress.org


    I’ve installed that development version, and it does fix the problem.



    It seems to work with fix… Please update it on wordpress.org repository thank you

    Hello. This seems to have fixed the problem. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Magic Fields 2] 'Insert into Post' changes to 'Insert into field'’ is closed to new replies.