Closed (fixed)
Project:
Discogs
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Aug 2011 at 21:02 UTC
Updated:
25 Jan 2012 at 01:30 UTC
Jump to comment: Most recent file
when I try to import releases, images are not being imported. this is a *new* issue, just started a few days ago on my productions site (Nothing has changed on my site, no updates, no changes, nothing ).
Everything imports okay, but the files get written my "covers" directory are only 20 bytes or so. Logs error is this:
imagecache 08/14/2011 - 15:21 403: File is not an image ...
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Issue-1249212-by-Karlheinz-djfake-Fixed-images-not-i.patch | 1.34 KB | Karlheinz |
Comments
Comment #1
Karlheinz commentedAnother user reported this as well. No idea what's going on, it sounds like something on Discogs.com's end. I will investigate tonight after I eat dinner...
Comment #2
Karlheinz commentedFound the issue...
Checking on the Discogs.com forums, it appears that this happens whenever the HTTP request does not supply a "User-Agent" header. I was actually using PHP's
fopen()function to read the file from the URI, which naturally doesn't supply that header.I've switched to using
drupal_http_request()instead, which does show that header. That function returns an object, with the data as a field to that object; hopefully it won't mess up with large files.I tested this on my machine, and it works. I pushed this to 6.x-1.x, and am attaching a patch. Also, I'm switching this issue to "Needs review." Please test, and report any "suspicious behavior," as the Feds say.
Comment #3
strawberrybrick commentedpatch worked, thanks _again_ Karl
Comment #4
strawberrybrick commentedGetting another error now, no image imported. After rest imports, there's an error:
"Failed to open http://s.dsimg.com/image/R-2736713-1298733113.jpeg"
Comment #5
strawberrybrick commentedAnd today it works (still using the patch from this bug)..... sorry!
Comment #6
Karlheinz commentedYou know, that happened to me a couple of times too... it always resolved itself, and I was never able to figure out what was wrong. It happened occasionally ever since I started developing the site, and I think it's something wonky on Discogs.com's end. But I don't have a clue what causes it or how to fix it.
Tell me if you run into the problem again. Also, if you can, try to simply copy and paste the URL into your browser, and see if that works. If it does, obviously it must be something on my end.
Comment #7
Karlheinz commentedAfter re-writing for Discogs API v.2, I'm closing this issue as fixed. Re-open if it happens again.