Closed (fixed)
Project:
AmazonS3
Version:
7.x-1.0-beta4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jun 2011 at 08:26 UTC
Updated:
20 Jul 2011 at 05:31 UTC
This module used to work just fine with image styles then I upgraded to D7.2 and now they don't seem to work right. My thumbnail url is being generated as http://folioh.s3.amazonaws.com/styles/thumbnail/s3/images/1/187987-happy...
It seems the styles aren't being generated at all.
Comments
Comment #1
pichot commented+1 Having the same problem.
Comment #2
allella commentedThis also occurred for me after updating to Drupal 7.2.
The project page for Media Amazon says,
but it looks like it's no longer generating the derivative on the first call to the image style.
Manually calling http://example.com/system/files/styles/style_name/s3/images/imagename.jpg will generate the image style.
The node templates use
However, the render() function in the node templates now return the S3 path, like http://bucketname.s3.amazonaws.com/styles/style_name/s3/images/imagename..., even though it has never been generated the image style by first calling http://example.com/system/files/styles/style_name/s3/images/imagename.jpg
While debugging, the media_amazon_url_outbound_alter() function in the media_amazon.module fires/executes for many other path on the page, but it doesn't seem to fire when render() is called by the node template.
I'm not sure if this is a bug, or if we should be using another theme function, or variable, with the properly altered Media Amazon's url_outbound_alter path. The theme_image_style() function mentions that it "does not work with images outside the files directory nor with remotely hosted images".
Comment #3
justafishComment #4
infines commentedETA on this patch?
Comment #5
justafishorangecoat-ciallella is correct, something changed in core and hook_url_alter is no longer picking up the external URL generated by the stream wrapper. I have a fix that I've pushed into the new repo that you can try, but I haven't written up any docs for installing the new module yet. It requires the latest amazon sdk and you'll need to configure your security settings via the awssdk module: http://drupal.org/node/1171712/commits
Comment #6
infines commentedThis seems to be working nicely, it even seems to fix the authenticated user upload problem [http://drupal.org/node/1199562]. It runs a bit slower, but I assume that functionality is coming fairly soon.
Comment #7
olrandir commentedWill there be a fix for this issue in this project as well (media_amazon for D7.2), or should we wait for a full release of the amazonS3 module? Is there a timeframe for that?
Also, is the media_amazon module being deprecated in favor of amazonS3?
I tested applying the changes from the commit in #5 to media_amazon's MediaAmazonS3StreamWrapper.inc, and on first glance this seems to fix the issue here as well. Will test some more and come back. Kudos for the work!
Comment #8
justafishno I won't fix it here as well, this is fixed in amazons3 so use that instead:
http://drupal.org/node/1171712/release
Comment #9
justafishComment #10
justafishComment #11
allella commentedAs pointed out in #5 and #8, IF you're already using the Media Amazon module, you'll want to switch to the AmazonS3 module.
Steps:
Now image styles are now properly generating S3 paths.
Notes: