While using the "Image Resize Filter" with a private filesystem, the appropriate resized files are created in the right places in the private filesystem. However, upon attempting to access those files, I get a Drupal error "Page not found". The URL is accurate and I can see the file in the filesystem where it should have been found by Drupal.
The URL is of the form http://www.myserver.com/system/files/resize/myphoto-100x100.jpeg for a resized image of size 100x100 and the location in the filesystem was /myprivatefiles/resize/myphoto-100x100.jpeg.
Upon investigating this further, I think I found a bug in the image resize module code. A trivial one, no doubt. But it caused me to lose quite a bit of time chasing down various other module upgrades to find the problem. Hopefully, this will help others in the same boat. Otherwise, thanks to the author for a useful module.
Attaching the patch for review and incorporation. Many thanks to the Drupal community. I'm a recent member of the community and find it to be a great CMS toolset.
--Eko
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | image_resize_filter_private_extensions2.patch | 886 bytes | quicksketch |
| #2 | image_resize_filter_private_extensions.patch | 881 bytes | quicksketch |
| image_resize_filter.patch | 967 bytes | ekoaham |
Comments
Comment #1
quicksketchWow, yeah this looks like a simple typo. Moving to needs reviews so I'll test it next time I'm looking at Image Resize Filter. The patch looks great, but as a reminder make sure to use the "unified" format when creating patches with the "-u" flag.
Comment #2
quicksketchI revised your patch slightly and just moved the dot outside the parenthesis so that we don't need to include it for each extension. Committed. Thanks for the report and patch!
Comment #4
tsokura commentedMoving the dot outside the parenthesis changes the patch, it's not semantically the same anymore without further changes to the code. See the $matches[] references after the modified line in the patch and you'll see what I mean.
Anyway the original patch by ekoaham worked for me too, for displaying resized files when using the private download method. The revised patch by quicksketch didn't work, so I'm setting this issue to active again. Could we also get a new release of the module with the patch included, it's really a showstopper for those of us using the private download method. Thanks.
Comment #5
quicksketchOh dear, you're correct, because then the "." gets dropped and isn't included in the final filename when we reconstruct it. Shoot. I'll correct it next time I'm working on Image Resize Filter.
Comment #6
quicksketchFixed with the attached patch. Committed.