Closed (fixed)
Project:
Taxonomy Image
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
5 Sep 2007 at 20:30 UTC
Updated:
20 Feb 2008 at 23:31 UTC
Taxonomy image create file path like this: /files/category_pictures_1 is not very nice if you would like work on a specific image type with JavaScript (png for IE>7 for example).
Is better if you have a image path with the extension: http://www.itn.ch/fr/system/files/category_pictures_1.png
Comments
Comment #1
gagarine commentedoups sorry i write the full path..
Correct:
Is better if you have a image path with the extension: /files/category_pictures_1.png
Comment #2
nancydruI don't know how it would work at all without the extension. Certainly on all my sites it shows the extension properly.
Comment #3
gagarine commentedstranger... perhaps a incompatibility with taxo + taxoimage + taxomenu + i18n
Any body can confirm?
Comment #4
nancydruHmm, I went to the site you have linked above and it is not a Drupal site. It is using frames - Drupal does not.
Comment #5
dman commentedThe PROBLEM is that the file_save_upload() and $taxonomy_image_path are not working as expected.
On a brand new install, the directory files/category_images does not exist, and it's not getting made automatically
in taxonomy_image_save(), saving the uploaded file to a directory that doesn't exist instead has the odd behaviour of just trying to save the image with the filename 'category_images' (no extension)
And subsequent uploads fill my file directory with files (category_images_1, category_images_2, category_images_3 etc)
They ARE image files, so work when they are called, but they have no extension, are in the wrong place, and have lost their original names. All very messy, and surely not what was intended.
You would not have seen this on a site where you'd already created the category_images dir by hand.
I only noticed it because I was trying to run pngfix on the images ... which, as described, had no extension.
Here's the fix, calling file_check_directory() just before trying to save :
I'm rolling a bigger patch right now, so my distro is unclean, so please add this by hand.
Comment #6
dman commentedhttp://drupal.org/node/164447 also identified the same problem
Comment #7
gagarine commentedyeah is not the drupal site because the drupal site is not ready for production now (but certenly in few week). This is the old site. Sorry...
Thanks for the "patch" :) and the explanation.
Comment #8
nancydruFix committed.
Comment #9
nancydru@dman - I wondered about that "&" in the "check_directory." I'm getting lots of this:
So, I'm removing the "&".
Comment #10
dman commentedsorry. That was just a copy&paste leftover. And maybe PHP4 testing. I can't recall now.
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.