Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The themable function that creates the image markup seems to append 'system/' in front of the relative path (E.g. http://www.example.com/SYSTEM/pathtoimage/image.jpg).
Comments
Comment #1
acI think this is something to do with the secure file setup. I use IMCE on this test setup too, and that works and it uses the system/ in the file path. Maybe its not displaying for me for someother reason.
Comment #2
acOk this is an issue with private file system. I have changed the title of the bug report. Images are not displaying properly when the file system is set to private
Comment #3
kkaefer CreditAttribution: kkaefer commentedI could not reproduce this issue with private file sytems. Do regular file attachments work? slideshow.module uses the exact same functions. Reopen this issue if you provide information on how to reproduce it. It could be that this problem is caused by imce.module, not by slideshow.module.
Comment #4
acI can successfully upload and attach images to a node, they simply do not display properly when the filesystem is private. I have replicated this with IMCE off. Upload module works fine in private mode, as does IMCE. The src of the image seems to be like in IMCE (eg includes system/ in front of the relative path) but the image does not render in the browser for slideshow. IMCE does render images that use this private src.
All I did to replicate was enable private files and upload and attach images to a slideshow node.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI believe you need to add an implementation of hook_file_download because you aren't accessing the uploaded file but rather the scaled file. When you go to the url
system/files/filename.WIDTHxHEIGHT.ext
the upload.module can't find that file in its table so it doesn't return any headers. I think you can fix this problem in one of two ways.1. Insert the scaled image file in to the upload.module table (this is probably the proper way to do things)
2. Use the following code to map between the new filename and the uploaded filename:
I had to do this in the 4.7.x version of this module but I am having other problems with the slideshow.module at this point so I can't be sure.
I would rather document my fix here and see if it helps other people while I track down my other problem.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedI just realized that the proper code in the 5.x version of this module is:
Comment #7
Roz-pT CreditAttribution: Roz-pT commentedYup, I had this problem also. Had to revert to public.
Comment #8
JDSaward CreditAttribution: JDSaward commentedI added a slideshow to a 5.x site with private file downloads and encountered the same problem. The code at #6 resolved the problem.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedI do not know the state of the slideshow module, but can this be closed or should a patch be generated? People are still having this issue as of May 2008, would a patch be accepted?
Comment #10
Matt Schuckmann CreditAttribution: Matt Schuckmann commentedI had this problem and adding the code from #6 to the end of the slideshow.module file fixed so I'd say a patch or version rev would be on order.
Comment #11
kkaefer CreditAttribution: kkaefer commentedFixed in 2.x-dev