Title: [Plugin: Magic Fields 2] &#039;Insert into Post&#039; changes to &#039;Insert into field&#039;
Last modified: August 20, 2016

---

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

 *  [gavinwebb](https://wordpress.org/support/users/gavinwebb/)
 * (@gavinwebb)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/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.
 * Thanks.
 * Gavin.
 * [http://wordpress.org/extend/plugins/magic-fields-2/](http://wordpress.org/extend/plugins/magic-fields-2/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [dashaluna](https://wordpress.org/support/users/dashaluna/)
 * (@dashaluna)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490331)
 * 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.
    Dasha
 *  [yianniy](https://wordpress.org/support/users/yianniy/)
 * (@yianniy)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490411)
 * 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
 *  - 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' ) );
          	  }
          ```
      
    - 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](https://wordpress.org/support/users/hunk/)
 * (@hunk)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490502)
 * Hi, you can update a devel version [https://github.com/magic-fields-team/Magic-Fields-2](https://github.com/magic-fields-team/Magic-Fields-2)
   and tell me if work fine for update this version in wordpress.org
 *  [Paul Bunkham](https://wordpress.org/support/users/pabline/)
 * (@pabline)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490540)
 * Hi,
 * I’ve installed that development version, and it does fix the problem.
 * Cheers,
 * Paul.
 *  [gleenk](https://wordpress.org/support/users/gleenk/)
 * (@gleenk)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490541)
 * It seems to work with fix… Please update it on wordpress.org repository thank
   you
 *  Thread Starter [gavinwebb](https://wordpress.org/support/users/gavinwebb/)
 * (@gavinwebb)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490553)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/magic-fields-2.svg)
 * [Magic Fields 2](https://wordpress.org/plugins/magic-fields-2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-fields-2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-fields-2/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-fields-2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-fields-2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-fields-2/reviews/)

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [media](https://wordpress.org/support/topic-tag/media/)

 * 6 replies
 * 6 participants
 * Last reply from: [gavinwebb](https://wordpress.org/support/users/gavinwebb/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-magic-fields-2-insert-into-post-changes-to-insert-into-field/#post-2490553)
 * Status: not resolved