Posted by imp7 on June 11, 2009 at 3:10am
Jump to:
| Project: | File (Field) Paths |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Greets, this module is great.
Just when using the http://drupal.org/project/filefield_paths with node tokens the image generated with crop_display.jpg does not use the same path tokens, so unwanted folders with the literal token names are generated.
Is this the right place for such a bug or is it better to report it in the filefield_paths issue list?
Cheers.
Comments
#1
Ok did some more testing. Fresh drupal install, with the following enabled.
FileField 6.x-3.0
ImageField 6.x-3.0
Latest
Image crop 6.x-1.x-dev
FileField Paths 6.x-1.x-dev
I am using this node based path to test it out.
token path - [author-name]/[type]/
node/add form
1 User uploads in image crop widget
1.1.1 Image is added to filesystem root folder
1.1.2 Image duplicated with .crop_display.jpg in filesystem root folder
1.1.3 Image is created and resized to thumbnail with same filename to imagefield_thumbs directory
1.2 User Selects crop area and saves node
1.2.1 Image added to filesystem root (1.1.1) is properly cropped and moved to correct node based token file path, with directories created automatically
1.2.2 Image duplicated with .crop_display.jpg (1.1.2) and thumbnail (1.1.3) is left in same locations
node edit form
1.3 Image crop widget is not displaying the .crop_display.jpg image to select a new crop from, its the cropped image itself (1.2.1)
1.3.1 User presses remove from widget, (1.2.1) image is duplicated in its token based directory with .crop_display.jpg
1.3.4 The thumbnail image is left underneath the empty state of the imagefield crop widget
1.3.4.1 User selects a new image to upload same things from 1.1.1 - 1.1.3 happen
1.3.4.2 Previous image in 1.1.3 has strange black appearing on it.. I'll upload it if you need to see
node delete
1.4 correct cropped image is deleted from correct token path, token path folder left in place
1.4.1 Image duplicated with .crop_display.jpg 1.1.2 left in same location
1.4.2 Image in thumbnails 1.1.3 is left and there is a node based token path left empty in the imagefield_thumbs directory
I am unsure when this was created, in step 1.1.3 there was no node based token path in imagefield_thumbs
Hope this helps, I am willing to do more testing if required.
#2
I am getting the same results.
Drupal 6.12
ImageAPI 6.x-1.6
FileField 6.x-3.0
FileField Paths 6.x-1.2
ImageField 6.x-3.0
Image crop 6.x-1.0-beta3
#3
Thanks for the report and the extensive testing!
I do not know enough the filefield_paths module. I've glanced at its code, and I see it added specific support for imagefield. I then conclude from this that imagefield_crop should be added to filefield_paths.
I am moving this issue to the filefield_paths issue queue - if you know more about filefield_paths and think differently - please update here.
#4
Hi guys,
Will look into this ASAP and see if I can reproduce the issue.
Cheers,
Deciphered.
#5
Hi guys,
I have created a fix for this issue and will commit it shortly.
Cheers,
Deciphered.
#6
Fix committed to DRUPAL-6--1 - http://drupal.org/cvs?commit=225752
May be backported to DRUPAL-5.
Cheers,
Deciphered.
#7
Nothing needed to be done for DRUPAL-5.
#8
Wow its working Deciphered, love your work!
After testing I confirm everything seems to be working as it should, in that the images in proper token based paths are being deleted when saving, editing and deleting nodes :)
Not sure if this is related and maybe I should post my concern elsewhere, but is it normal that image_thumbs from imagefield are not deleted after the node it was generated from is deleted? Also the images are left on the server if the user uploads an image and the node form does not complete ie. the user looses the internet connection or the browser crashes etc...
#9
Thanks Deciphered.
Same here. After uploading and cropping a picture via 'imagefield_crop' module. I could view it but couldn't edit it. Image wasn't showing. Confirming that the comment #6 fixed this issue http://drupal.org/node/488264#comment-1706184
The new working 'filefield_paths 6.x-1.x-dev' module can be found at: http://drupal.org/node/286611
Not for production site.