I have a strange issue -
I have drupal install in a local development environment, as well as my live server environment.

In my local development environment, wysiwyg_imageupload works properly. When I upload everything to my server, it stops working (Specifically, I can still upload images via wysiwyg_imageupload, but while I click "insert image" nothing happens -the window just closes. A manual check of the imagecache profile directory shows that no imagecache image was generated).

At first I thought this must be a directory permission problem with imagecache, but I confirmed this is not the case as
1) I do not receive any error notices and
2) both imagecache itself as well as other imagecache plugins (i.e. imagefield) work fine on the server / are able to produce thumbnails fine.

Then I thought it might be a directory/path thing, because my local dev environment uses a different URL then the live site. I therefore deleted all caches, as well as uninstalled wysiwyg_imageupload, and then reinstalled it in the hopes that would fix the problem. It didn't.

Any help on how I can diagnose this problem would be appreciated!

Thanks

Comments

newmediaist’s picture

Well, I discovered one small potential bug, but fixing it hasn't fixed my problem.

WYSIWYG image_upload looks for the following file:
http://localhost/drupal/sites/all/modules/jquery_ui_dialog/css/jquery_ui...

Yet here is how the stylesheet is actually named:
http://localhost/drupal/sites/all/modules/jquery_ui_dialog/css/jquery_ui...

BTW I'm using JQuery_UI Dialog API 6.x-1.3, as well as the correct versions of Jquery Update/UI (I know they are the correct versions as WYSIWYG image_upload works fine on my local install, which uses the exact same files)

newmediaist’s picture

Ok, Some more info: I've been doing some tracing with FireBug, and found out that the error lies when there is a GET request for the image:

http://site.com/drupal/index.php?q=ajax/wysiwyg_imgupl/showimage/4bc8670... (301 Redirect)
http://site.com/drupal/ajax/wysiwyg_imgupl/showimage/4bc867051db32/Large... (404 Not Found)

so the problem lies why /drupal/ajax/wysiwyg_imgupl/showimage/4bc867051db32/Large/bulldogclub.jpg is returning 404.

Something I should also mention: my local server runs Apache, my Live server runs NGINX - I should have all the correct rewrite rules setup for ImageCache/Drupal on Nginx though, as demonstrated by the fact that Imagefield/ImageCache both work perfectly.

EugenMayer’s picture

Category: bug » support

http://www.ubuntu-pics.de/bild/52508/screenshot_128_uyj27X.png

So actually

jquery_ui_dialog/css/jquery_ui_dialog.child.css

should be the correct file. but once again CVS tricked me...so the release seem to not inlcude the correct files, as the online archive does not include those files.
I prepared a new release here : http://drupal.org/node/773226

You might want to check it.

For you image problem, no idea. Probably you did not enable the imageAPI libs (gd / imagemagick) or all the other problems you can see on the project page or in the close support issue. Please read those, iam a bit tired to repeat them all myself again and again.

newmediaist’s picture

Title: Image uploads fine, but does not get processed by imagecache/does not get inserted into post » How to ensure wysiwyg_image_upload works with NGINX
Category: support » bug
Status: Active » Closed (fixed)

Solved!

Because the "standard" Drupal NGINX conf file is setup to serve image file requests directly, an override for wysiwyg_imgupload needs to be created to force it's images through Drupal"

# wysiwyg_image_upload needs to have php read any files that it's planning to manipulate
location ^~ /drupal/ajax/wysiwyg_imgupl/showimage {
index index.php index.html;

if (!-e $request_filename) {
rewrite ^/drupal/(.*)$ /drupal/index.php?q=$1 last;
break;
}
}

I don't know if this should be added to the Readme or something?

=)

EugenMayer’s picture

Well thank you a lot for this hint. Of course this will be added to the hints, this is a great contribution!