This patch addresses a few issues in the 5.x-1.0-beta1 release;

* The directory is not created if it doesn't already exist, which means that files have no file extension, and lose their original file names and extensions being renamed 'category_pictures', 'category_pictures_0', 'category_pictures_1' etc.
* Paths relative to index.php are stored in the database causing problems for multi site configs and moving a site between dev and live instances
* The link to admin/help/taxonomy in the help text on admin/content/taxonomy/image was broken
* One minor typo in code comments

This patch will break image resizing (and other features?) for any existing taxonomy_image images in your database. You can either upload images again, or update your database removing file_directory_path() .'/' from the beginning of each taxonomy_image in your database with a bit of SQL.

If you write such SQL for this patch, please contribute that SQL back here so that other users can use it to update their databases, and so that it may be included in the update function along with the release that this patch goes into.

I haven't tested it with settings different to the defaults in admin/settings/taxonomy_image. More testing would be great before including it in the repos...

CommentFileSizeAuthor
taxonomy_image bugs.patch4.34 KBBevan

Comments

Bevan’s picture

Do any other functions in the module use the path of the image from the database and depend on that path being relative to index.php? The File API seems to be quite smart in that it tries paths passed into it relative to both index.php and file_directory_path() before failing, which provides some margin for error / flexibility here.

dman’s picture

Status: Needs review » Closed (duplicate)

I think that patch is to major for what it's trying to do. The fix is smaller.
see http://drupal.org/node/173360