Support » Fixing WordPress » Images Upload but using Add Media to Add an Image from URL stalls

  • Resolved rexgoode

    (@rexgoode)


    I’m new to wordpress and like it a lot. Thanks to those who maintain it.

    I have read the problems with the image uploader. For me, the uploader works, but when I try to use the Add Media buttons to add an image from a URL, it stalls. I’ve read the sticky and done everything that applies to my browser. I’ve tried various browsers. They all stall the same way.

    I’ve checked it out as thoroughly as I can and I think that I’ve isolated what looks like a problem.

    As near as I can tell, when I click on “Insert into Post” the following javascript should happen. I get it from wp-admin/includes/media.php.

    <script type="text/javascript">
    <!--
    top.send_to_editor('<?php echo addslashes($html); ?>');
    top.tb_remove();
    -->
    </script>

    The send_to_editor javascript function that is called is in wp-admin/js/media-upload.js. I’ve done what I could to see if this file is actually included. It seems it is not.

    I tried to figure out how that js file should get loaded and I discovered wp-includes/script-loader.php with this code:

    $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080109' );

    Without having gotten into the intricacies of script-loader.php, I wondered if I was onto something here, but I’m getting more into it than I want.

    I also noticed that the code after the above line was:

    $this->localize( 'upload', 'uploadL10n', array(
                                    'browseTitle' => attribute_escape(__('Browse your files')),
                                    'back' => __('&laquo; Back'),
                                    'directTitle' => attribute_escape(__('Direct link to file')),
                                    'edit' => __('Edit'),
                                    'thumb' => __('Thumbnail'),
                                    'full' => __('Full size'),
                                    'icon' => __('Icon'),
                                    'title' => __('Title'),
                                    'show' => __('Show:'),
                                    'link' => __('Link to:'),
                                    'file' => __('File'),
                                    'page' => __('Page'),
                                    'none' => __('None'),
                                    'editorText' => attribute_escape(__('Send to editor &raquo;')),
                                    'insert' => __('Insert'),
                                    'urlText' => __('URL'),
                                    'desc' => __('Description'),
                                    'deleteText' => attribute_escape(__('Delete File')),
                                    'saveText' => attribute_escape(__('Save &raquo;')),
                                    'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.")
                            ) );

    If I look at other combinations of the add and localize methods there, should this be:

    $this->localize( 'media-upload', 'uploadL10n', array(

    I tried changing it and it doesn’t fix my problem, so these are just clues. I’d like to be able to add a video this way, but it just isn’t working.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would also like to know if I’m barking up the wrong tree entirely. I’m not trying to upload an image. I came across this problem trying to insert a video into a post. The video already resides on my server. I just click on the Add Media button for video, put in the URL and a title, and click on Insert in Post. That’s when it freezes. Trying the same thing with an image also freezes it.

    eibhlin

    (@eibhlin)

    I’m having a similar problem. I can upload the image (it’s now in my Gallery and Media Library), but when I click on “Insert into post”, the media screen turns all white and then stalls.

    I was able to add a different image to an earlier post this morning. It’s a new site and I have about 15 other WPs running on the same hosting service. I’m not sure why this one has a problem.

    I’m not uploading or inserting video, just an image that I’ve used online in the past. (Travel photo, smallish.)

    I’ve cleared my cache, tried a different (smaller) image, activated the no-Flash media plugin, closed and reopened WP, and… still no luck.

    eibhlin

    (@eibhlin)

    Okay, it suddenly started working. I’m not sure why, but there it is. Next time, I’ll be more patient. It was probably something at the server.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images Upload but using Add Media to Add an Image from URL stalls’ is closed to new replies.