Closed (duplicate)
Project:
Lightbox2
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2009 at 17:51 UTC
Updated:
14 Sep 2009 at 00:13 UTC
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
Comment #1
stella commentedCan 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?
Comment #2
Apfel007 commentedHi 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/filenameis this correct?Cheers
Comment #3
stella commentedwhat 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
Comment #4
luebbe commentedHi 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.
Comment #5
Wim Hellinck commentedIt 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.
Comment #6
stella commentedI think this is a duplicate of #569936: Download Original Link fix for private download method