I have a weird behaviour in a multisite installation, working on a small 2-language site (public files and php 5.2.9).

I created a language enabled nodetype with an imagefiled. The imagefiled is set to display as an imagecache preset on body view.

If the imagecache image does not exist yet, it does not show up when going to the node page. If I enter the imagecache URL, my homepage comes up. The URL is the usual imagecache one http://domain.com/sites/domain.com/files/imagecache/preset/pathtofile.jpg (same happens with sample image)

Doing some trial and error, I found out that the imagecache URL will process OK if I add a language prefix to the URL: http://domain.com/es/sites/domain.com/files/imagecache/preset/pathtofile.jpg

From there on, the imagecache is available with any URL (with and without prefix) and it obviously shows on node view.

I have checked the troubleshooting page, but those solutions did not work for me, and I don't think it is a rewrite issue because:
- if I use the same imagecache url pointing to a non-existing file http://domain.com/es/sites/domain.com/files/imagecache/preset/nonexisting.jpg it renders a blank page
- if I use a normal filepath url: http://domain.com/es/sites/domain.com/files/pathtofile.jpg the file is there
- if I use a normal filpath url pointing to a non existing file: http://domain.com/es/sites/domain.com/files/imagecache/preset/nonexisting.jpg it gives a 'page not found' error

Is this the normal behaviour or is it a bug? Is there a workaround for adding a language prefix to imagecache URLs?

I hope you can help. Thanks in advance.

Comments

Careless’s picture

I'm experiencing the same issue. ImageCache does not append the "fr" to my french translated nodes, and thus the views that pull the images associated with the currently displayed node using a nid argument does not show the thumbnails properly. The thumbnails in the view do not display, however when clicked- the resulting images are shown in the lightbox2 properly.

There should be a flag that checks if the current node has a language associated with it- if the currently associated language has a URL prefix, and then apply that prefix to the imagecache URL.

I am not skilled enough to make such a change in the code though.

ispboy’s picture

Priority: Normal » Critical

me too. But i found that it's cause of the url rewrite.

fizk’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Please confirm this is still an issue with the latest 2.0 dev release.

fizk’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
tnfno’s picture

Status: Closed (cannot reproduce) » Active

This is still an issue in latest dev release. The language path is added so the image cannot be found. Image cache should not use language path, neither should any file path so it could be an issue on how drupal gets the path to the files directory?