Download & Extend

Using Imagefield Crop Cannot Re-Crop Image if Pathauto is Used For File Name Cleanup

Project:File (Field) Paths
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

So far I've only noticed this affecting images that have spaces their file names. For Instance, if I upload an image named "Sample Image.jpg", the two images that are generated are:

sample image.jpg.crop_display.jpg
sample-image.jpg

As you can see, one has a hyphen and the other keeps its space. The result is that when I return to edit the node, it doesn't find the original uncropped image. If I manually rename the "crop_display" file to include the hyphen, then it shows up fine. (By the way, I already updated Filefield Paths to include this fix, so the two files are at least in the correct location.)

So is this an Imagefield Crop issue? Or is it another Filefield Paths issue? Or is it a Jared12 issue—did I just miss a setting somewhere?

Drupal 6.12
FileField 6.x-3.0
FileField Paths 6.x-1.x-dev
Pathauto 6.x-2.x-dev
ImageField 6.x-3.0
Image crop 6.x-1.0-beta3

Comments

#1

Title:Cannot Re-Crop Image if Pathauto is Used For File Name Cleanup» Using Imagefield Crop Cannot Re-Crop Image if Pathauto is Used For File Name Cleanup
Project:Imagefield Crop» File (Field) Paths
Version:6.x-1.0-beta3» 6.x-1.x-dev

I'm guessing this must actually be a Filefield Paths issue, so I'm moving it to this queue in hopes that someone might know a fix.

#2

Status:active» postponed (maintainer needs more info)

Hi jared12,

What's the date of your dev release of FIleField Paths?
I've tested with the latest and it works perfectly.

Let me know.

Cheers,
Deciphered.

#3

Okay, I did a clean Drupal install using only the following modules:

CCK 6.x-2.4
Filefield 6.x-3.1
FileField Paths 6.x-1.x-dev (2009-07-10)
Imageapi 6.x-1.6
Imagefield 6.x-3.1
Imagefield Crop 6.x-1.x-dev
Pathauto 6.x-1.1
Token 6.x-1.12

And after messing with settings all day, I finally managed to recreate the issue. It appears that the issue only occurs if the main pathauto settings are set to convert to lower case:

URL Aliases > General Settings > Character case: Change to lower case

Thanks for looking into this!

#4

Status:postponed (maintainer needs more info)» active

Wow, this was a pain to reproduce, but I've finally figured out how to and I've got a fairly good idea about fixing the issue.

To reproduce you need to be converting to lower case and have an image that contains uppercase characters.

#5

Suspect that this issue and #522678: filepath variable not processed (Problem when using with ImageCrop Field) are the same issue, and that fix in that issue does fix this issue.

Fix will be in the next development release.

Cheers,
Deciphered.

#6

Fantastic! Thanks for your hard work and a great module.

#7

Status:active» fixed

Fix committed to DRUPAL-6--1 and DRUPAL-5.

Cheers,
Deciphered.

#8

Status:fixed» closed (fixed)