I'm using the "private" files administration option in Drupal, with my /tmp and /files directory inside a /private folder outside my web root. Normal attachments and file uploads work fine.
CCK is at version 5.1.6.1
Imagefield uploads do not work 3 out of 4 times I try...and then suddenly they "work"...the filename shows up with no thumbnail preview, and then when I submit the node, the image either appears or doesn't....seemingly at random.
Often I'll have to log in as a different role to view the image...and then log back in as admin...when I log back in as admin, the image is now visible, provided I've already been logged in as a different role.
My hunch is that there are several, separate issues at work here...but I don't know where to start...
I also have CCK field permissions and Taxonomy Access installed...
Admin has been given ALL view/edit/delete/list/create permissions on all content types, fields, and categories.
Comments
Comment #1
seddonym commentedI think I'm experiencing a similar problem but have some more (very strange) clues.
Significantly, if I have IE7 and Firefox both logged in, and then submit a new piece of content with an image in each browser, then the browser that I DID NOT submit the image in displays the image fine but not the one where I did submit the image.
There's a lot of weird behaviour where images suddenly start or stop working but I haven't been able to replicate them, however here is my double-browser investigation:
1. Create new piece of content with an image attached.
In Firefox:
Upload picture (goose) not visible in preview
Upload picture not visible once submitted
In IE7:
Upload picture (cow) not visible in preview
Upload picture not visible once submitted
2.
View all news stories
In Firefox
Cow picture visible, goose picture not visible
In IE7:
Goose picture visible, cow picture not visible
(Yes I have typed this correctly - the goose was submitted in Firefox but is only visible in IE7, and vice versa for the cow).
3.
View individual URL
http://xxxxxxxxxxxxx/system/files/newsimages/goose.jpg
http://xxxxxxxxxxxxx/system/files/newsimages/cow.jpg
Firefox:
Cow shows fine.
Goose seems to crash a 'page not found'. If I view source it just shows the first 30 lines or so of html for the Drupal page not found. Then it just stops.
IE7:
The same but the other way around. (I think - cannot view source in IE7 on this page for some reason.)
4.
Alter rewritten URL by typing a ?q= likeso in the address bar:
http://xxxxxxxxxxxxx/?q=system/files/newsimages/goose.jpg
http://xxxxxxxxxxxxx/?q=system/files/newsimages/cow.jpg
Firefox:
Cow displays ok
I thought goose displayed ok, but now I go back to check it maybe it doesn't.
However I am sure there have been times when making this step does display the correct image. Sometimes it then means that I can repeat step 3 and suddenly both images display fine.
IE7:
Same behaviour as in 3.
5.
Various fiddling around sometimes results in all the images being displayed. I haven't been able to discover exactly what caused it. However in general once it 'takes' the image is then displayed all the time.
UPDATE:
After writing this I have just refreshed both browsers. Now Firefox is displaying both images but IE7 is still as before.
The images are all there on the server - I've checked using my FTP client.
Could this be something to do with session variables or maybe caching?
Versions:
1. CCK Version - not sure but the Readme file is v 1.8.2.2
2. It does this both in the stable release (5.x-1.1 and in the latest development snapshot).
3. Permissions: The files directory is not in the public_html directory but one step above - it has 777 permissions as do subfolders. The images uploaded have 664.
4. Private download method
I think I've given all the other information.
Comment #2
seddonym commentedOh - by the way it all worked fine on my local server.
Comment #3
seddonym commentedHi
Is this issue likely to be assigned to anyone or is the module no longer in development? Just so I know whether to bother keep checking back here!
Thanks
Comment #4
leeksoup commentedI have a little input on this. I have a few Imagefield-type fields set up on our Drupal-based test site. They have always worked for me, but last week I had another user contact me to say that it did not work for her. She had similar problems to those reported here.
But here's the weird part: when I log in using her account, it worked fine for me. (I run Linux and she runs W-XP). She then tried logging in from a different computer, and it worked for her then.
So it seems like it is not simply a problem with this module. At the very least there is some OS and/or browser involvement. I asked my user to gather a bit more information regarding the OS and browser version details, hoping for a clue to the source of the problem. Perhaps that information from others, like yourselves, with this problem would help as well.
Comment #5
seddonym commentedHi
I have just noticed on the imagefield download page that it says that private files do not currently work. I wonder if they intend to fix this?
I guess I need to come up with some other strategy - it's difficult because I need to have some access control on certain files but I'd like to be able to upload images to certain node types.
If I manage to come up with a decent alternative I'll post back here.
Comment #6
dnbsecrets commentedthere seems a bug with gzip output compression & firefox.
when u output gzipped compressed binary data to firefox.
so that's actually not a bug of drupal or imagefield.
i have the same problems with imagecache also
that outputs also images with php.
Comment #7
baja_tz commentedNot fixed so changing status.
See http://drupal.org/node/155726#comment-635896
Comment #8
dopry commented@Andrupal can you let us know which OS and Webserver you are using?
Comment #9
quicksketchClosing, please open new issues for the 2.x version as the 1.x version is no longer supported.