Download & Extend

Preset does not render because language prefix is not included in the imagecache URL

Project:ImageCache
Version:6.x-2.0-beta10
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

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

#1

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.

#2

Priority:normal» critical

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

nobody click here