• Hi,

    I’ve been using Inline Attachments for a while, and have found it to be a very useful plugin, so thank you.
    However, several times the meta box has not displayed properly (not appearing at all in most cases) and on inspection of the JS console I see that jQuery has not loaded properly and is “undefined” causing the box not to show.

    I poked around for ages trying to figure it out, and have realised that you are not adding jquery as a dependency when enqueing your JS files in inline-attachments.php.

    Here is a fix I propose you release as a minor version to help correct this issue for any other users:

    function add_post_screen_js(){
      $script_url = $this->dir . "/js/inline-attachments-post-screen.js";
      /**** Replace This
        wp_register_script('inline-attachments-post-screen', $script_url);
        wp_enqueue_script('inline-attachments-post-screen');
      ****/
      wp_enqueue_script( 'inline-attachments-post-screen', $script_url, array( 'jquery' ) );
      wp_enqueue_script('thickbox');
      wp_enqueue_style('thickbox');
    }

    The other JS files would follow a similar pattern. What do you think?

    http://wordpress.org/extend/plugins/inline-attachments/

  • The topic ‘Media Box not showing – possible solution’ is closed to new replies.