Forums

Image Widget
Add image, upload an image select Insert into widget. No image is shown. (9 posts)

  1. BjornW
    Member
    Posted 3 months ago #

    = Problem =
    Cannot add a new image from upload to the widget using the following steps:

    = Reproduce issue =
    1) Press Add Image
    2) Upload a new image using browser upload, the uploading works fine as the image can be found in the Media Library.
    3) Press 'Insert into Widget'
    4) No image is shown in the widget, but the 'Add image' has changed into 'Change Image'.

    Instead of uploading a new image you'd select an image from the Media Library the widget does work as expected and displays an image after selecting 'Insert into widget'. Also if I use the Flash based uploader instead of the browser based uploader it works as expected.

    = Enviroment =
    - WordPress Multisite (v3.2.1.) for an internal website, which at the moment cannot be upgraded to WordPress 3.3.
    - PHP version is PHP 5.3.5-1ubuntu7.4 with Suhosin-Patch.
    - Browsers used:
    Chrome 16.0.912.77 (Developer Build 118311) Ubuntu 11.04
    Firefox 10
    IE 7
    - Image Widget v3.2.11

    http://wordpress.org/extend/plugins/image-widget/

  2. trustweb.ms
    Member
    Posted 3 months ago #

    I'm also looking for the solutions of this issue...i'm facing troubles with flash uploader under SSL connection but, actually, browser uploader dosen't help

  3. BjornW
    Member
    Posted 3 months ago #

    I think I've found the issue:

    The image-widget code uses a function is_sp_widget_context() (in image-widget.php line 106) which makes sure the image-widget code only runs in the context of the Image Widget. It does this by checking if the http referer or _wp_http_referer contains 'widget_sp_image'.
    WordPress uses a variable widget_id when using the media library and when using the Flash uploader (see the referer urls), however it does not use this variable when uploading through the browser based form, which I presume might be a bug in WordPress 3.2.1 (haven't checked later versions).

  4. BjornW
    Member
    Posted 3 months ago #

    Actually the widget_id seems to be set by the image-widget in /views/admin-widget.php

  5. BjornW
    Member
    Posted 3 months ago #

    I've solved this issue with a bit of Javascript. I have described the problem more detailed on my own site including the solution. Check it out here:

    http://www.burobjorn.nl/blog/2012/02/08/howto-fix-wordpress-image-widget-plugins-html-form-based-uploads/

  6. BjornW
    Member
    Posted 2 months ago #

    Update: The guys from Modern Tribe have included my proposed fix (in Image Widget 3.3.x) and thus my patched version is not needed anymore.

  7. jasonblewis
    Member
    Posted 2 days ago #

    Hi,

    I'm still seeing this issue with 3.3.4 of the widget.

    Uploading a fresh copy of the image is a work around for me.

    Just thought I would mention it in case anyone else is having the problem.

    Running it on a networked site with wp version 3.3.2

    Jason

  8. BjornW
    Member
    Posted 2 days ago #

    Jason,

    Could you describe exactly what you are doing (similar to my first post) and which browser you are using? This makes it possible to reproduce the issue so it can be fixed. Thanks!

  9. jasonblewis
    Member
    Posted 1 day ago #

    1) Press Add Image
    2) Upload a new image using flash upload, the uploading works fine as the image can be found in the Media Library.
    3) Press 'Insert into Widget'
    4) No image is shown in the widget, but the 'Add image' has changed into 'Change Image'.

    note" same steps as you were making, only I used the flash uploader.

    This is in Chrome on OSX. not sure of the version, but current stable as it updates itself.

    Also on a multi site install.

    Hope that helps?

    Jason

Reply

You must log in to post.

About this Plugin

About this Topic