Firstly, apologies if this is not the right section to post this support request. I have an image gallery and using taxonomy images - when trying to upload new images I am getting the following error message. I have tried to look through google search engines but cannot see a fix for this, any advice greatly appreciatted.
warning: getimagesize(sites/default/files/category_pictures/sites/default/files/category_pictures/massage.jpg) [function.getimagesize]: failed to open stream: No such file or directory in D:\xampp\htdocs\enhance\sites\all\modules\taxonomy_image\taxonomy_image.module on line 267.
Regards
Comment | File | Size | Author |
---|---|---|---|
#5 | taxonomy_image_1038668.patch | 655 bytes | hadsie |
error.jpg | 133.39 KB | crasher |
Comments
Comment #1
joachim CreditAttribution: joachim commentedIt's often a safe bet that the module which produces the error message is the one to file a bug on :)
Reassigning to taxonomy_image.
Comment #2
crasher CreditAttribution: crasher commentedSorry, what do you mean by reassigning to taxonomy_image. Apologies as i'm a novice to Drupal.
Comment #3
joachim CreditAttribution: joachim commentedI mean I've already done that -- look at the 'project' field for this issue.
You should update the version number though.
Comment #4
kevinquillen CreditAttribution: kevinquillen commentedI get this same error, and it points to line 267 in taxonomy_image.module:
$img = getimagesize($image[$tid]->url);
That URL points to /category_picture/foo.bar - I changed it to this and the 'file not found' warning went away for me:
$img = getimagesize(file_directory_path() . '/' . $image[$tid]->url);
That would make it 'sites/default/files/category_picture/foo.bar' - returning a result for getimagesize().
Comment #5
hadsie CreditAttribution: hadsie commentedI think the source of the error is a bit further up the file at the point when the url is set. This patch fixes the issue.
Comment #6
joseph11 CreditAttribution: joseph11 commentedIn my case this didn't help either.
The problem was that the path was correct, but the server couldn't serve image by 'http://' protocol.
Solution was replacing the method that builds URL:
Comment #7
andrewko CreditAttribution: andrewko commentedFor what it's worth, only changing the file_create_url() to file_create_path(), worked for me. I did not need to change the first argument to $fullpath.
Comment #8
tuthanh CreditAttribution: tuthanh commentedI got it.
In the file taxonomy_image.module, line #244, replace
by
Then go to line #268, change
to
Works perfectly.
Comment #9
davident CreditAttribution: davident commentedThis solution worked for me as well. The others listed here produced similar errors because it was looking for the image in the module folder.
Comment #10
morybel CreditAttribution: morybel commentedThis worked for me also, Thanks a lot.
Comment #11
Katrina B CreditAttribution: Katrina B commentedI'd like to see this committed as a patch; I'd rather not hack the module.
Comment #12
sproot CreditAttribution: sproot commentedIt was broken for me too, because 'allow_url_fopen' was set to FALSE in php.ini, so you can't access files by url (as I understand it). Everything I've read points to it being a huge security hole, so I won't be changing it.
Looks like the change above will prevent it from trying to open the file by url and use the path instead, which will probably fix it.
Comment #13
m.schwarzenberg CreditAttribution: m.schwarzenberg commentedThank you tuthanh for posting your solution.
It works perfect.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedI had this problem too, using version 6.x-1.6.
The workaround in #8 worked for me too, except it was line 243, and I didn't need to do the second part: the code was already like that!
Comment #15
lpc CreditAttribution: lpc commented#6 worked for me, Thanks!
Comment #16
Alexandr.P CreditAttribution: Alexandr.P commentedComment #17
r.aubin CreditAttribution: r.aubin commented#7 worked for me as well. I changed the function name and images began to appear on the term edit screen as well as Views I had configured to pull in taxonomy term images.