Support » Fixing WordPress » Add Media – Insert Image in Post not working

  • Here’s the problem on a client WP install & particulars:

    Bluehost, running WP2.6.1.
    Initial WP install was done via Fantastico.
    Upgraded to WP2.6.1 using WPAU plugin (today).

    Problem:
    The problem existed before the upgrade to 2.6.1. Upgrade did not change anything in regards to problem.

    We can upload an image, but if you try to insert it into a post, you get a blank screen (both flash or browser method).

    In IE7, there is a error message in the browser status bar, when clicked on this is the message:

    Line: 4
    Char: 1
    Error: Object doesn’t support this property or method
    Code: 0
    URL: http : // client url/wp-admin/media-upload.php?type=image&tab=type&post_id=150

    I have tried the list of things on Otto’s great thread on Image/Media Uploader problems with no results.

    Also, tried another suggestion that included deleting /wp-includes/js directory and reinstalling with fresh code.

    Also, deactivated all plugins, still same problem.

    Any ideas or suggestions are greatly appreciated.

Viewing 15 replies - 1 through 15 (of 44 total)
  • Well, Otto’s list for 2.5 does NOT work for 2.6.1. I tried everything he recommended: http://wordpress.org/support/topic/164999 including a complete re-install exactly as he suggested … verbatim.

    I have come across several WP users who are having the same problem:
    http://theappleofmyi.com/blog/wordpress-add-media-issues/
    http://www.simplydunn.net/tag/wordpress-26/

    Tried Dustmagics suggestion here: http://wordpress.org/support/topic/165217?replies=22#post-832268 and it also does NOT work.

    Will take any other suggestions.

    It may have something to do with the configuration/setup of your permalinks. In Firefox, if you right-click the image and copy the location, does it pull up a legitimate link to your image(s), or a bunch of gibberish? Out of curiosity, just as a test, try putting the code into your post and directly link to your image manually then see what happens:
    Example: (Use whatever path is proper for linking to your image, of course)
    <img src="yourdomain.com/wp-content/images" alt="my image"/>

    Bernard,

    Thanks for responding!

    Ok, r-clicked & path is clean code to image, then tried it in post and when switched back to visual view from html, displays the image just fine, even before saving/publishing post.

    Will play a bit with permalinks to see if it might be the problem.

    …….
    Anyone Else with IDEAS? Please post, I know that the solution, when found, will please at least 5 WP users that I’m aware of.

    Thanks in advance!

    BTW, have also eliminated PHP & MySql versions as the problem.

    Have same problem w/ wp 2.5. Worked for 2 wks, then stopped working in both IE 7 & FF 2. Images are from local file uploaded, crunched & then seen in gallery & media. Get blank dialog box & msg “Done’ in lower left corner. Tried both IE & FF from desktop & laptop. Same neg results. Tried login w/ my login & w/ other admin login. Same results.
    Sorry to hear that 2.6 didn’t solve this as that was my next attempt.
    Hope someone has positive results.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    In IE7, there is a error message in the browser status bar, when clicked on this is the message:

    Line: 4
    Char: 1
    Error: Object doesn’t support this property or method
    Code: 0
    URL: http : // client url/wp-admin/media-upload.php?type=image&tab=type&post_id=150

    This is a javascript error, and it mainly indicates that something is wrong with the browser side of things. It could be a lot of things, but the most likely is that the required javascript libraries and code is not correctly loading from your website.

    Check that all the javascript files in WordPress are loaded on the server correctly, and check that they all have the correct permissions.

    For a test, setup a new test copy of WordPress in another directory entirely, and see if that one works. If so, compare what’s different between those two.

    Check the browser’s error console (use Firefox), see if any errors strike out at you.

    In short, when you have a javascript error like this, it’s always a *site* issue, not a bug in WordPress. For some reason, your browser is not receiving the correct javascript code from your site. Your job is to figure out why.

    Found a temp work around. Use top button to “Add an Image” next to “Add Media”, copy “Link url” for ur image, then use “Insert/Edit Image” button from icon toolbar in Post dialog box, paste in url, then insert image & voila!
    Extra work, but a temp fix that gets the image in.
    GreenEnergyForEarth.com

    Ok, one step closer I guess.

    Messed with Permalinks, but don’t see any problems there. Experimenting didn’t change anything.

    I then spent time looking at the Add Media and decided to click on the Add Media icon rather than the Add Image icon.

    That WORKED, then tried the Add Image icon and now it’s working too, BUT only on FireFox. IE still gives the dreaded blank white screen.

    Hey THANKS Otto, I was hoping you would stop by! Makes sense, especially in light of what I just posted (before seeing your response).

    Now just wondering why it would “just start working”? Will experiment and if I find anything further will update this thread.

    Thanks for the suggestion eblock, maybe someone can use it {temporarily} while trying to get their js working.

    Well I have been looking at different fixes, and tried them all, from fresh installs, to my browsers, to the .htaccess edits from different suggestions. Nothing works. About as far as I get is the pop-up tat ask if your sure about leaving the page stops coming up.

    I do believe it is crazy that a piece of blogging software has this problem at all, and I never had the problem until 2.6, and I can upload to pages fine, it is only POST. Thanks for all the suggestions so far, and I guess keep them coming.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    JayMyers: I think you’re missing the fact that the piece of blogging software does not have this problem, it is your specific site that is having this problem.

    Until you accept that, you’re not likely to make much forward progress. Focus on why your site is having the issue. Because many, many other people run the same software without issues.

    Websites are unique, and will have their own issues. This is a simple fact of webhosting.

    Otto42, I (respectfully) believe you are missing the point… that 2.6.1 does have a problem.

    I have tried both upgraded and fresh installations of 2.6.1 on a proven server (the server is hosting other wp sites) and am having the same problems:
    – Firefox 3: Image insertion is not completed… left with white pop-up box.
    – IE 7 produces errors (only attaching the first error message; otherwise my reply would would go on forever):

    (function(){document.open();document.domain="happyearthtextiles.com";var ed = window.parent.tinyMCE.get("content");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()

    I found that 2.6’s image (& gallery) insertion works fine; though there are header conflicts when either the WordPress Automatic Upgrade (v1.2.2) or cforms (v8.7) plugins are activated.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    refriend: I hear you and understand what you’re saying, but you’re also missing the fact that 2.6.1 *does* work just fine on my own server, on test servers I’ve setup, on GoDaddy hosting which I use for some sites, etc, etc.

    So while I indeed believe you are having a problem, I’m not ascribing that problem to 2.6.1 in specific.

    The “error” you posted is in fact not an error, but javascript code. That code should not be displaying anywhere at all, so I’m curious to know where it showed up at, exactly…

    Well, it gets worse. I have now done a dozen fresh installs of 2.6 and 2.6.1. (Note: after doing a number of complete site reloads to test 2.6 vs 2.6.1, I am now simply purging the 2.6 database and uploads folder.) With no changes to the settings and no activated plugins I can not get a consistent working installation.

    Common errors:
    1. white pop-up box.
    2. the image uploader pop-up displays a wordpress login page after uploading an image.

    The errors occur regardless of whether writing a new post/page or editing an existing post/page. Only one type of error occurs per install… which error I receive is a crap shoot.

    Web host: Lunarpages
    Reported as PHP Version 4.4.9 (though configured for 5 per server instructions.)
    MySQL client version: 4.1.22

Viewing 15 replies - 1 through 15 (of 44 total)
  • The topic ‘Add Media – Insert Image in Post not working’ is closed to new replies.