I just wrote a patch at #2049797: The Media Flickr module should use a local stream wrapper, since it already saves a local thumbnail of the Flickr image which makes the flickr:// stream wrapper provided by the Media Flickr module point to a subdirectory of the public files directory, but with image derivatives generated normally.

Without going into the gory details, this breaks Stage File Proxy - the module can't find the local image styles for this stream wrapper at all, so it tries to serve them all remotely (and, correspondingly, fails).

Here's a patch that at least prevents that from happening. I'm not sure if it's totally correct (my guess is it doesn't successfully retrieve remote files using this stream wrapper in the case where it's supposed to), but it solves the worst part of the problem.

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

Here is the patch.

greggles’s picture

When you say this "prevents that happening" does that mean it prevents the failure and things work properly or that it just fails more gracefully.

Did you try doing a stage_file_proxy_hotlink vs. not?

David_Rothstein’s picture

Prevents the failure. Meaning: Before the patch, if I try to generate a Media Flickr image derivative on my local site, Stage File Proxy gets in the way and serves a 404 instead. After the patch, it gets out of the way and allows the image derivative to be generated.

I haven't fully tested the effect of this patch on image derivatives that are supposed to be pulled in from the production server though, and haven't tested hotlinking vs. no hotlinking either.

greggles’s picture

Status: Needs review » Fixed

Seems good to me, let's see what dev users think - http://drupalcode.org/project/stage_file_proxy.git/commit/dc42600

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.