• I could not add media (imaged) easily to my post, by using the “Upload/Insert” “Add an image” button.

    I got no popup for uploading, but a new page openend. When selecting media, filling in the required fields, and pressing “Insert into Post”, nothing happenend. Furthermore, I noticed the JavaScript error “win.send_to_editor is not a function” in the error console.

    I read a lot of messages from other people complaining about the same problem.

    My solution was simple, after some research:

    * In the child directory of my theme (themes/twentyten-child), I had to modify the functions.php file. I added a function to it:

    function enable_media_upload(){
            wp_enqueue_script('media-upload');
    }

    and added a line to the list of add-filter and add-action items:
    add_action( 'admin_menu', 'enable_media_upload' );

    Thereby, when logged in as admin for adding a post, the “media-upload” javascript file was included, enabling to add media to my post. Now everything works fine.

    Is it normal that this is missing? Is this the correct way to solve it? Or is this a bug of the “older” version of WP I am using, which is the Stable version in my Debian release?

Viewing 2 replies - 1 through 2 (of 2 total)
  • There’s no known bug of this type in WP 3.0.4, so I suspect this has something to do with your browser or your server. Try removing the function you added and, instead, adding:

    define('CONCATENATE_SCRIPTS', false );

    to the bottom of your wp-config.php file (just before the require_once line).

    Thread Starter JGeo

    (@jgeo)

    Thank you very much for you quick response.

    I tried this, but when I remove the extra line I suggested, image editing broke again, and it was not restored by the extre line you suggested. Unfortunately.

    Then I tried it in IE (instead of FF), and got, with your suggestion, a Runtime error “‘a.widget.prototype._trigger’ is null or not an object”, in line 13 of jquery.min.js.
    And with my version, I got “MS JScript runtime error: Object expected” in line 3 of wp-admin/load-scripts.php.

    I have no clue what is broken. I use the latest jquery version 1.6.4, but with 1.4.2 it does not work either.

    I’ll try upgrading to a newer WP version, but upgrading from Lenny to Squeeze.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Solution for "media-upload not working" on Post-edit page’ is closed to new replies.