Support » Plugins and Hacks » Images not Saving to Image Widget

  • Resolved Peter Chester


    I’m using wp 2.84. All the image widgets were gone from the sidebar and I’ve tried adding them back but when you try to add an image either from my computer or the media library it acts like it’s going to add an image but when you click “insert into post” the directions box that you’re working in just goes blank and then if you bypass that and click on “save all changes” it goes back to where you select an image. Either way when you go back to the widget, no image is there and when you save the widget and view page only the title is showing up, no image.

    I’ve deactivated the plugin and reactivated it, I’ve logged in and out, I even tried uninstalling the plugin and reinstalling and deactivating other widgets that use images. Not sure what to try from here.

    Thanks taking the time to respond though. 🙂


    Hi Laurie, thank you so much for the feedback. I’d very much like to help you resolve this.

    what browser are you using? What OS? Are you willing to record what happens in a screen video (I personally like using Jing for that)?

    Thanks again Laurie!

Viewing 15 replies - 1 through 15 (of 63 total)
  • I’m using firefox and windows xp. Sure, I’ll record what happens in a screen video. Will it have to be posted online though?

    Thanks for your help!


    (no, you can email it to me and i’ll follow up with comments on here)


    Same problem. Click link to add image, and when I add an image either by upload, or from Library, when I insert into post no image shows up, only title if I added one. I’m using 2.8.4, and version 3.0.4 of image widget. I’ve deleted it, reinstalled, but it doesn’t work. I’ve tried other versions, same problem. Any Ideas? I really want the functionality of this plugin. It looks fantastic, but alas…

    New install WP 2.8.4 & new database. No other widget, or plugins, and the problem with image widget is the same. It shows up in widgets area, but it will not add the selected image. Any thoughts? Fixes?

    Laurie, than you for your screencast.

    Squigie, are you on windows or mac? what browser? I’m wondering if this is a javascript issue on windows or something. It works for me every time but i’m on a mac.

    Same issue here. Running xp and wordpress 2.8.4. Have tried image widget using in firefox, explorer, chrome and opera…all with the same result as described above by Laurie.

    I’m really thinking this might be a windows / javascript issue. I’m not super good at javascript and don’t have windows (i’m on a mac). If anyone has javascript skills, I’d embrace the support. 🙂

    I’ll try to help you out since I’m having this problem on my production server which is a linux system.

    Just so everyone is on the same page here, does everyone who’s having issues end up with a blank thickbox when trying to add the image? I get a blank thickbox and this error in firebug:
    win.send_to_custom_field is not a function

    I don’t get this error on my local windows machine that I’m doing all the development on and it’s a weird javascript error if it’s server related.

    I’ve got some javascript chops so I’ll try to track this down and fix it. This widget provides some really essential functionality that wordpress has been lacking for quite some time so I’m hoping I can find what’s causing this.

    If anyone else out there who’s having issues could check what happens in firebug and confirm that you’re getting the same error I would be very grateful.

    Oh wow what a mess (not your plugin :P).

    I have tracked this down and it appears to be a javascript conflict. In my case the conflict was with custom field template, can anyone else confirm that they get the error when using custom fields and image widget together?

    If I turn off custom field template then everything works. I am using version 1.3.7 of custom fields template, I will try it with version 1.3.8 as well.

    For anyone else tracking this, the thickbox is an iframe with its own scripts loaded. Some plugins load their scripts into the thickbox and I’m not sure if they belong there.

    Peter can you confirm if the thickbox actually needs your javascript loaded inside it or if it’s only needed in the admin section?

    Ok I can confirm that the conflict is coming from custom field template. It appears that he hooks in to when the image is “transferred” from the thickbox to its final destination.

    When his code runs on the widget page it gets confused since the code he’s depending on is not there, his function fails and so does your script along with it.

    I see two (maybe three) ways to fix this:

    1. The fast (and painful): Simply choose which plugin you need the most and deactivate the other one
    2. The long road: We talk to the guy who made custom field template and ask him to solve this. His plugin is very active so I think there might be a good chance that he will comply.
    3. The sneaky (and untested) solution: Hit his plugin with a remove_action() to remove the offending javascript when on the widget page. If we can make sure this plugin gets loaded after custom field template it should theoretically be possible to remove the action hook that adds his code.

    That’s all the options I can come up with. I’ll be exploring option three and see if I can get that to work.

    smurkas! you rock! I’ll tinker with that a bit tonight and see what i can find.

    I’m having the same problem as above…when I click to add an image, I can upload one from my computer or browse the library, but when I click to “insert into post”, nothing happens.

    Smurkas, sounds like you discovered and are fixing a different problem. I don’t have the Custom Field Template plug-in installed.

    BTW, using WP 2.8.4. Windows XP. Tried with FireFox 3, IE8, Google Chrome, Safari 4. Same result in all, except that in the last three, the “Add an Image” box just goes blank when you click “insert into post”. No JavaScript errors showing up in FireFox error console.

    Thanks for checking it out!

    It sounds like the same kind of error that we’re getting from the conflict with custom field template. When I have custom field template on I get the exact same behaviour.

    What plugins are you running?

    If you have the possibility it would be very appreciated if you could turn off all your other plugins and see if the problem persists. If it works without the other plugins on I would be even happier if you could help us track down the plugin that’s conflicting.

    Also the javascript error could be occurring inside the thickbox which is in an iframe so in that case I don’t think we’d actually get a warning from firebug :(.

    I tried turning off all the other plug-ins…that doesn’t seem to be it.

    Strangely, it works on my development server with everything almost exactly the same as my live server.

    Problem seems to be with this line:

    if (strpos($_REQUEST[‘_wp_http_referer’],$this->id)) { // check that this is for the widget. SEE NOTE #1

    $this->id appears to be empty to have a value, so there’s no match, and nothing is returned to the widget. Why the widget name (this->id) is disappearing, I don’t know. (I don’t know what NOTE #1 is, but I understand why you need to do this check–so you don’t return the JavaScript array to other functions calling the image_send_to_editor() function.)

Viewing 15 replies - 1 through 15 (of 63 total)
  • The topic ‘Images not Saving to Image Widget’ is closed to new replies.