WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images not Saving to Image Widget (64 posts)

  1. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    peter at shaneandpeter.com

  2. squigie
    Member
    Posted 4 years ago #

    smurkas, I have same config & problem as capnhairdo, "WP 2.8.4. Windows XP. Tried with FireFox 3, IE8, Google Chrome, Safari 4. Same result in all", and my server is linux running php5. Same problem, no picture in side bar. Also, my WP install is a fresh 2.8.4, out of the box no other plugins, it's a skunk works to figure out why the plugin doesn't work.
    Sorry it took a bit to respond.
    Thanks

  3. capnhairdo
    Member
    Posted 4 years ago #

    Peter, just sent you some suggested changes to the code that seem to fix this problem, as well as add some more features. Let me know what you think.

  4. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    capnhairdo, i got your code. looks great. i'm going to poke at it and test a bit and if all is well i'll add it to the plugin.

    I also got some feedback from Nick Momrik from WordPress that they might be interested in the widget if it used the caption, link, and title from the actual uploader. Capmhairdo actually implemented some of that.

    I'm thinking about removing the input fields and having that fully controlled by the image uploader. what do you think? (i'm opening this subtopic as a separate forum item)

  5. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    FYI posted the topic here: http://wordpress.org/support/topic/319562

  6. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    I've added capnhairdo's updates to trunk. :)

    Before releasing this
    # i'm doing some testing on php4
    # i'm debating about either removing the fields that are repeating from the uploader so that you just edit title and stuff int he uploader or having the fields in the widget actually save to the image post so that they stay in sync. The only problem with this is that it's not going to be backwards compatible so people will need to recreate their widgets, but it will be much more robust for core integration.

  7. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    BTW, here are some notes from capnhairdo from his awesome updates:

    • Made the media pop-up resize to fit the window, as it does when you use it for posts.
    • Modified the image_send_to_editor() function. Instead of passing back an JavaScript array (img id & img html), it passes back the same html that's passed to it. Instead, it gathers and passes all the image information back to the widget via JavaScript variables set on the window object.

      Advantages: the image_send_to_editor() can be called multiple times without causing harm, and you don't need to figure out definitively whether it's the widget calling it or not.

      Previously, the media pop-up was just being used to get an image url and id, and it effectively ignored any other settings. It now passes back all the information it can: img id, img html, alt, title, alignment, link url and image size (small, medium, etc.). I've added JavaScript that pushes all these to the widget.

    • Added an align option: none, left, center, right to the widget.
    • Added JavaScript to dynamically update the image when you change the width, height or alignment in the widget fields. (Note that you need to add a .aligncenter class to global.css to get center alignment to preview.)
    • Simplified the set_active_widget() function, passing only the instance_id to it.
    • Made the "Add an Image" button change to "Change Image" if an image already exists.
  8. L_T_G
    Member
    Posted 4 years ago #

    I installed the new updated version of the image widget but nothing has changed for me. I still get a blank after clicking "insert into post". Is it now working for everyone else who was having problems?

    I'm just a wp user not a code writer type so I'll have to wait while you smart ones figure it out. :)

    Thanks!
    Laurie

  9. squigie
    Member
    Posted 4 years ago #

    Okay, thanks a lot guys, it works! It will now allow me to insert pics. Question, when i change the width of the pic it set a relative height, is it supposed to?
    Thanks you, peterchester & capnhairdo for all the work. It's an awesome plugin. You might want to look at blogwell's image widget for insight.
    http://wordpress.org/extend/plugins/simple-image-link/

    Thanks, again.

  10. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    Thanks smurkas!

    Laurie, did you get the code from "trunk"? I haven't updated the actual live plugin. I'm planning on posting an update to the live plugin on monday morning.

    Here's where the latest code lives: http://svn.wp-plugins.org/image-widget/trunk/

  11. L_T_G
    Member
    Posted 4 years ago #

    Peter...
    I just now copied and pasted the code (from the link you posted) into the "edit" area of the plugin (deactivated it first and replaced all the code that was there)...updated the file and activated the plugin. I tried again and it still doesn't work for me.

    L.

  12. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    Lauri, I've release the latest version so that you can be sure yours is up to date.

    that said, I've already received a report of the same problem.

    Laurie, do you have any other plugins running? Wonder if there might be a conflict.

  13. jdlejeune
    Member
    Posted 4 years ago #

    I've tried to reinstall the plugin as well, but still the same white window.

    Computer: XP and Firefox 3.0.14
    Server: PHP 5.2

    In IE I get this error:
    "Object doesn't support this property or method"
    Line 16, Character 1

  14. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    What other plugins are you running? wondering if there's a plugin conflict.

  15. L_T_G
    Member
    Posted 4 years ago #

    I'm using:

    Akismet
    Dean's FCK Editor for WP
    Image Widget
    Live Countdown Timer
    Maintenance Modge
    Search Everything
    Share This
    Snap Shots
    Sociable
    Spelling Checker
    WP Auctions

    Nothing is new...it was all the same before the upgrade for Image Widget (on Oct. 4th or 5th) when I started having the problems. (I've deleted a bunch that weren't being used since then but it hasn't made any difference.)

  16. jdlejeune
    Member
    Posted 4 years ago #

    Events Manager
    Image Widget
    Simple Flickr Photos

    I turned off Events and Flickr and I could use Image Widget! I've added my images and then reactivated my other plugins and the front-end of the site seems fine.

  17. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    FYI, I just released an update to the widget. It's a very minor update but it seemed to fix the problem of the upload screen going blank when clicking "Insert Into Post".

    Let me know if you have problems after this update.

  18. L_T_G
    Member
    Posted 4 years ago #

    I installed the update and still got the blank upload screen so I deactivated all other plugins except image widget and then it worked just fine and I was able to upload an image and place it in the sidebar.

    I started reactivating the plugins one by one and testing as I went. The one causing the conflict appears to be "Dean's FCKEditor For WordPress" because after I reactivated it, I again got the blank box when trying to use image widget.

    Thanks for all the help!
    Laurie

  19. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    Laurie! that's very helpful! I'll take a look.

  20. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    Laurie, thanks to your wonderful QA i was able to reproduce the bug and to fix it (I hope).

    Please update to 3.0.7 and let me know if that solves the issue. Thanks!!!

  21. L_T_G
    Member
    Posted 4 years ago #

    YAY! It works! I probably should've started by eliminating all the other plugins and then adding them back one by one. Sorry about that.

    Peter, (and all) thank you so much!

    Laurie

  22. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    BTW, Laurie, do you mind marking this as resolved?

  23. L_T_G
    Member
    Posted 4 years ago #

    I don't have that option when I leave a comment since I didn't really start the thread or is there another way I can do that?

  24. Peter Chester
    Modern Tribe
    Posted 4 years ago #

    Silly. Of course.. i started it. not sure how i managed to get that confused.

  25. devilsavocado
    Member
    Posted 4 years ago #

    I seem to still be having this issue. Latest WP, and with all the other plugins disabled, the issue prevails, tried on FF 3 and Safari on PC.

    Seems it is trying to load the folder of the image, instead of the complete file name, i.e. uploads/2009/11/10 instead of uploads/2009/11/10/image.jpg

    Anything else you need me to provide, just name it :)

  26. adam533
    Member
    Posted 4 years ago #

    Just wanted to let you know I am having the same exact problem. I click on the add to widget button, and only see the white screen. I have disabled all my plugins and found the one causing the problem: Custom Field Template. Once that is disabled it works fine. Hopefully there can be a fix for this since these are two plugins my clients really needs on the site :)

    Thanks,
    Adam

  27. robertdrake
    Member
    Posted 4 years ago #

    I'm having the same issue as devilsavocado. The widget does pull down the correct link: it skips the filename entirely. Any solution in the works?;

    This is wordpress 2.9.1. Same issue in every browser. No other plugins installed and I've gone through the usual uninstall reinstall trick.

  28. szbalazsb
    Member
    Posted 4 years ago #

    Hi!

    My solution for "win.send_to_custom_field" or "win.send_to_editor":

    I use custom field template plugin and many plugins. I'm sure that cft make the problem, conflict with hooking "media_send_to_editor" :

    add_filter( 'media_send_to_editor', array(&$this, 'media_send_to_custom_field'), 15 );

    I solved with this:

    Solution in custom-field-template.php :

    function media_send_to_custom_field($html) {
    		$options = $this->get_custom_field_template_data();
    
    		$out =  '<script type="text/javascript">' . "\n" .
    				'	/* <![CDATA[ */' . "\n" .
    				'	var win = window.dialogArguments || opener || parent || top;' . "\n" .
    				//'	win.send_to_custom_field("' . addslashes($html) . '");' . "\n" .
    				'	if(typeof win.send_to_custom_field == "function") {' . "\n" .
    				'	win.send_to_custom_field("' . addslashes($html) . '");' . "\n" .
    				'	} else {' . "\n" .
    				'	win.send_to_editor("' . addslashes($html) . '");' . "\n" .
    				'	}' . "\n" .
    				'/* ]]> */' . "\n" .
    				'</script>' . "\n";
    
    		echo $out;
    
    		if ($options['custom_field_template_use_multiple_insert']) {
    			return;
    		} else {
    			exit();
    		}
    	}
  29. henrikpp
    Member
    Posted 4 years ago #

    Peter (et al)

    I'm running WordPress MU 2.9.2 and I still get the conflict between Custom Fields Template and Image Widget.

    (when both are on, there is a white screen on "input into widget", when CFT is deactivated it works)

    I tried to go back to version 3.0.6 of Image Widget to see if any changes made later on would change the fix, but I still get the same error.

    The change suggested by szbalazsb also doesn't do anything for me. Is this possibly a WordPress MU thing, or has it been tested there by anyone else?

  30. JimFitzsimons
    Member
    Posted 4 years ago #

    I'm having the same problem as robertdrake and devilsavocado (above).

    I add an image from the media library and initially the image appears in the widget interface. As soon as I hit 'save', however, the image disappears from the widget interface.

    On the front end of the site, the image alt text and caption appear in the sidebar, but a quick look at the source code shows that the widget is displaying the URL of the containing folder (wp-content/uploads/2010/05/) as opposed to the image URL (wp-content/uploads/2010/05/imagename.jpg)

    I'm using the latest version of the widget (3.1.5 at time of testing) as well as the latest version of WordPress (3.0 beta). I'm aware that 3.0 beta may not be officially supported, but others appear to be having the same problem with earlier versions.

    I've tried uninstalling and reinstalling the plugin, as well as deactivating all other plugins. All to no avail. Any idea of how to fix this, as the widget seems ideal for my needs?

Topic Closed

This topic has been closed to new replies.

About this Topic