Is it possible to create relative paths for the image src attribute?
After moving the Drupal site from my development machine to the real world site, all images will disappear if the domain name doesn't match.

CommentFileSizeAuthor
#2 relative_paths.patch553 byteskndr

Comments

eugenmayer’s picture

Status: Active » Closed (fixed)

thats an imagecache issue. Please look at their issue queue

kndr’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new553 bytes

There is some problems with imagecache. I am pretty sure, EugenMayer, you know what I am talking about :) I've marked http://drupal.org/node/702318 as duplicated since there is the same findings inside http://drupal.org/node/241541 issue. Recently, I've tested some patches and described my thoughts (and new patch) in http://drupal.org/node/241541#comment-2945544 If my patch will be commited to imagecache, you can consider my attached patch for wysiwyg_imageupload module.

kndr’s picture

Version: 6.x-1.9 » 6.x-1.10
eugenmayer’s picture

Very nice contribution !!!

Thank you very much, i will defenetly consider to make it a part of the installation procedure so people dont run into those imagecache bugs.

adeb’s picture

Thanks a lot. I hope it gets committed to imagecache.

eugenmayer’s picture

Status: Needs review » Reviewed & tested by the community

Using http://drupal.org/node/241541#comment-2945544 for imagecache and http://drupal.org/files/issues/relative_paths.patch for wysiwyg_imageupload the absolute path problem is gone. Thanks a lot!

Well i will not take this patch in until the imagecache patch is not applied. I guess this would be the best approach, or?

eugenmayer’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Inlcuded in 6.2.0 beta 2. Thank you very much!

eugenmayer’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

eugenmayer’s picture

Status: Closed (fixed) » Fixed
eugenmayer’s picture

Status: Fixed » Closed (fixed)
slerby’s picture

I've this issue. All my path's to images inside TinyMCE editor are absolute. Is this a regression problem?

# drush @tolp status

Drupal version 6.19

# drush @tolp pm-list --type=module | grep -i wysiw

Drupal Wiki WYSIWYG Image upload (wysiwyg_imageupload) Enabled 6.x-2.4
Drupal Wiki WYSIWYG Image upload - Lightbox2 integration (wysiwyg_imageupload_lightbox) Not installed 6.x-2.4
Drupal Wiki WYSIWYG Image upload Browser (wysiwyg_imageupload_browser) Enabled 6.x-2.4
Drupal Wiki WYSIWYG Image upload migration tool (wysiwyg_imageupload_migration) Not installed 6.x-2.4
Drupal Wiki Wysiwyg imageupload - Migrates WYSIWYG imageupload 1-x t 2.x (wysiwyg_imageupload_migrate_1_2) Not installed 6.x-2.4

# drush @tolp pm-list --type=module | grep -i imagecache

ImageCache ImageAPI (imageapi) Enabled 6.x-1.9
ImageCache ImageAPI GD2 (imageapi_gd) Disabled 6.x-1.9
ImageCache ImageAPI ImageMagick (imageapi_imagemagick) Enabled 6.x-1.9
ImageCache ImageCache (imagecache) Enabled 6.x-2.0-beta10
ImageCache ImageCache UI (imagecache_ui) Not installed 6.x-2.0-beta10
eugenmayer’s picture

What about during node-render (view?)

slerby’s picture

This is the content of the textarea:
<span class="wysiwyg_imageupload image imgupl_floating_right imgupl_styles_spacing_5"><img src="http://<my-site>/sites/my-site/files/imagecache/wysiwyg_imageupload_preview/wysiwyg_imageupload/1/image.jpg" alt="25" title="" class="imagecache wysiwyg_imageupload imgupl_styles_spacing_5 imagecache imagecache-wysiwyg_imageupload_preview" style="" height="150" width="200"> <span class="image_meta"></span></span>Some text...

I've a development server (A) and a development desktop (B) both of them in a LAN with private IP's. So I've created some content in A from B desktop. The A server is listen on port #80 and port #8080. The port #8080 is redirected to por #80 with a ssh tunnel. Drupal website is installed (and configured) on port #80. From outside the LAN only the port #8080 is accesible and all traffic to port #8080 is redirected to B:8080.

When I work on B desktop I use port #80. If I create some content with some images and I look at the source code generated all the images have an absolute url (port #80). This works ok.

If I use port #8080 from B desktop and I create some content with some images the generated source code has images with absolute url (port #80). This works because I can access ports #80 and #8080.

But if I access B:8080 from a machine out of my LAN (C) I can't see the images because they have an absolute url with port #80. If I create new content from C machine I can see the images but I can't see images created (=uploaded) from B machine.

Of course a solution could be to redirect all incoming traffic to B:80 (not to B:8080) or to install Drupal in port#8080, but these are not solutions for me because I've not admin access to B machine.

Thx

eugenmayer’s picture

WUI is not handling Ports at all. All it does using url(). I cant see how i could help here

slerby’s picture

Ok, thanks a lot.