Hi, I see a lot of watchdog errors concering getimagesize. The path is wrong, I get getimagesize('/category_pictures/test') which of course fails the important part "sites/default/files".
In taxonomy_image.module, line 267, I changed:
$img = getimagesize($image[$tid]->url);
to:
$img = getimagesize(file_directory_path().$image[$tid]->url);
And the errors went away.
Am I doing something wrong, or is this a bug? I'm working on a localhost environment, but I never have Drupal path issues.
Comments
Comment #1
greta_drupal commentedI have now experienced this failure as well -- taxonomy images no longer show and error messages generate -- since updating core to 6.17 and contributed modules to the latest ImageAPI, ImageField, ImagefieldCrop (up from previous versions). The URLs definitely are not writing to include the
/sites/default/filespath prefix.Even though I did try morningtime's fix, it did not resolve for me. Besides, you shouldn't have had to add that
$img = getimagesize(file_directory_path().$image[$tid]->url);as it is already stated in the variables called by line 267:Also, changing the image processing to "ORIGINAL" in order to bypass ImageCache had no affect, nor did disabling the ImageCache module altogether.
Comment #2
greta_drupal commentedMoreover, the install file states:
Go to "administer >> settings >> taxonomy_image" to configure the module.
If you properly followed Step 0 above, this module will automatically create
the 'picture image path' which defaults to 'files/category_pictures'. You can
also configure the module to force pictures to be within a certain size,
automatically resizing if needed.
In any case, when I tried creating that second "files" subfolder and moving the "category_pictures" folder there, it did not correct the above-noted problem.
Also, since most people will have a file system directory of
/sites/default/files, making the taxonomy images default pathfiles/category_picturesadds a redundancy. Moreover, it makes better sense for clarity to simply name the containing foldertaxonomy_images. So, the full path default path (with typical file system config) would be:/sites/default/files/taxonomy_imagesComment #3
Anonymous (not verified) commentedSo it should be something like this?
Because I think $fullpath is the missing part then.
Comment #4
moonray commentedSeems like the line to fix would be line 243. This would be consistent with the code on line 261.
from:
to:
Comment #5
alexpottI was having this issue too...
I changed line 261 to:
Comment #6
noslokire commentedDid #5 but on Line 267, not 261 and its back
Comment #7
pvanderspek commentedI just upgraded CCK, Date, Filefield and Webform and right after that I started getting this error as well. Strange thing is that sometimes it works and sometimes it doesn't. I have a table with one of three taxonomy images per row. All three images are shown throughout the table, but on some rows no image is displayed. I have a long list with alternately these two errors in the drupal-logs:
Comment #8
pvanderspek commentedUpdated priority as it really is not ok that images are seemingly random displayed or not.
Perhaps this issue is related: http://drupal.org/node/438378
Comment #9
simon georges commentedHi.
I can confirm #6 (I did #5 on line 267, and the images are back for me).
I agree that this is a duplicate of #438378: function.getimagesize error. It seems the bug is fixed in 6.x-1.x-dev. So I closed this one.
Best regards,