When looking up the desired cropping data, manual crop joins the manualcrop and file_managed tables to find the data, based on an URI. This is fine as long as the URI has a local public:// scheme but when using other solutions, like the storage API for instance, the image effects are called with a tempoary:// URI as the source.
To be able to get the correct file URI, this patch adds a check to the manualcrop_load_crop_selection() function.
IMPORTANT! This currently requires a patch for the Storage API to work. http://drupal.org/node/1943124#comment-7178906
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | manualcrop-support_storage_temp_uris_with_original_info-1943166-8.patch | 572 bytes | ckng |
Comments
Comment #1
esbenvb commentedHere's the patch.
Remember to do the right attributions when porting patches, as mentioned on http://drupal.org/user/989064
Comment #2
matthijsThis looks nice, I'll certainly push if the StorageAPI patch gets committed!
Matthijs
Comment #3
matthijsComment #3.0
matthijsAdded link to storage API patch
Comment #4
kristougher commentedI was not able to apply the patch to latest dev revision. This is the exact same code patched from 1.x-dev
Comment #5
josh.fabeanCan confirm patch in comment #4 works for me and this fix still works today (May 12, 2015) on latest version of Manual Crop and StorageAPI. Is there any reason this hasn't been committed to latest dev yet?
Comment #6
tessa bakker@josh.fabean: The patch for StorageAPI #1943124: StorageTempURIs should support resolving back to the original URI, especially for image style generation etc. is required for this patch, so review the first one and when it's applied to StorageAPI, this one can be added to Manual Crop.
Comment #7
ckngReroll for dev.
Comment #8
ckngPrevious one was a bad patch. Try this.