Hi,
I recognize today a problem with download link in the lightbox. I use the private filesystem and it seems, that lightbox get the path directly from the filesystem menu. If I want to download, I got a url like this: ...https://is/htdocs/......./../correct_path/filename. And in this case it's not possible to download a file.
Further more I use imagecache and imagefield, or could that be the problem? Did someone know this? I use the newest dev version of lightbox.

Cheers Kai

Comments

stella’s picture

Status: Active » Postponed (maintainer needs more info)

Can you provide the full url (you can replace domain name if you want) and identify the parts you believe to be wrong? What version of lightbox2 and imagecache, imagefield and filefield are you using?

Apfel007’s picture

Hi Stella,

FileField 6.x-3.1
FileField Paths 6.x-1.3
ImageField 6.x-3.1
ImageCache 6.x-2.x-dev (2009-Jun-03)
Lightbox2 6.x-1.x-dev (2009-Jul-08)

That's what I'm using.
A few minutes ago, I tried to type in the site url directly like this, to get the image : https://mydomain.de/system/files/image_0.jpg - and it works!
What should happen if I click the download link? In my case a new tab is opening with the "htdocs" link.. is this the problem? (in firefox)
Why is the download button linked with ... https://is/htdocs/......./../correct_path/filename is this correct?

Cheers

stella’s picture

what is the https://is/htdocs/......./../correct_path/filename? I mean what is "correct_path" and what is the "......./../"? Are you replacing part of the path? Or is that actually what appears? Can you send me a link to the site where this is happening? My contact form is enabled if you wish to do so privately.

Cheers,
Stella

luebbe’s picture

Hi Stella,

I think I can add a bit of information here. First I thought it was a problem of the image module (see http://drupal.org/node/504494), but then I noticed that the problem is gone when I disable lightbox 2.

Lightbox2 6.x-1.9, Image 6.x-1.0-alpha5

Here are my observations:

Files are set to private. I have a private upload directory outside the web root. Lightbox is told to handle the "portrait" image size automatically.

Take a look at http://tam-lin.info/node/216 and hover you mouse over the "Original" and "Portrait" size links.

"Original" which is not handled by lightbox points to http://tam-lin.info/node/216?size=_original but "Portrait" is a link which contains an absolute url without the domain part pointing to the private, unreachable path: http://www/htdocs/w006c0e2/files/tam-lin/images/20090718_Rheinpfalz.port... instead of http://tam-lin.info/system/files/images/20090718_Rheinpfalz.portrait.jpg (I would have expected this url).

A similar bug is exposed when I change an images class to "inline" and enable the autmatic handling of "inline" images.

Wim Hellinck’s picture

It looks like an issue due to the usage of a private filesystem.
I guess replacing $item['filepath'] with file_create_url($item['filepath']) in the function theme_imagefield_image_imagecache_lightbox2 in the file lightbox2.formatter.inc should solve the issue.

stella’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)