uploading an image with embedded blanks does not display image

Events happening in the community are now at Drupal community events on www.drupal.org.
bvirtual's picture

D6 with latest modules installed via drush about 5 days ago.

I traced the issue to the cache folder not having the image there. The uploaded filename has it embedded blanks preserved by Linux (gentoo) as I found them in the imagecache subfolder tree. But the other images that were suppose to be generated were not found, but those image filenames with no blanks worked fine.

I suspect either the needed images are not being created on the fly, or are being flushed, and I ought to really look into this again, and will when testing and looking at the source code. It could be in imagecache, or I suppose image, or upload.

The client has 300+ images, all with multiple blanks embedded on a Mac, in some iMac gallery software she uses to sort the photos across galleries. She wants some 30+ galleries this time. Maybe more. So, renaming the photos now, is going to bust her current galleries. Sigh.

I'm going to read source code next. It's a lot of code to read, so I am posting here first. Need more details? I was skimpy here, as if no one has heard of this problem, then...

I searched the issue list at for terms like blank, upload, filename, missing, embed and no results. For any of those terms. I likely do not know how to use this search, but it has always worked for me in the past. Very strange.

http://drupal.org/project/issues/search/imagecache?status[]=8&status[]=13&status[]=14

I read the pending fix descriptions, not the detailed bug reports.

To be explicit about the folders

root@ns3 sites # cd default/
root@ns3 default # cd files
root@ns3 files # ls
backup_migrate css image imagecache imagecache_sample.png imagefield_default_images images js photos
root@ns3 files # cd imagecache
root@ns3 imagecache # ls
preview small thumbnail
root@ns3 imagecache # ls -lR
.:
total 12
drwxrwxr-x 3 apache apache 4096 Nov 14 20:37 preview
drwxrwxr-x 2 apache apache 4096 Nov 14 20:21 small
drwxrwxr-x 3 apache apache 4096 Nov 14 20:54 thumbnail

I'd show you the listing of these, but I deleted the three image files
the client uploaded, so they are not there. I googled and found
an old filename with embedded ampersand/

Comments

Transliteration Module

gclicon's picture

have you tried the Transliteration Module?

http://drupal.org/project/transliteration

I think that should do what you need it to do.

Transliteration module to try, for # sign, not blanks.

bvirtual's picture

The client had uploaded 3 photo filenames with blanks, and none worked.
I just drush update'd and tried filenames with 1, 2 and 3 embedded blanks. They all worked. Then I noticed one of the client's filenames had a # sign, and that failed. So transliteration here I come. Thanks glicon!

Peter

LA's Open Source User Group Advocate - Volunteer at DrupalCamp LA and SCALE

Solved thanks to glicon and transliteration

bvirtual's picture

I can no longer duplicate it. Now to tell my client to try again. Wow. Quick and easy.

Peter

LA's Open Source User Group Advocate - Volunteer at DrupalCamp LA and SCALE