- Issue created by @recrit
- Merge request !58Issue #3402972: fix file conversion image style support β (Merged) created by recrit
- Status changed to Needs review
7 months ago 12:57am 21 November 2023 - πΊπΈUnited States recrit
MR 58 has been opened with the fix for the 2.1.x branch.
Attached is a static patch at commit 28f616d8 for any builds to use. -
recrit β
committed 28f616d8 on 2.1.x
Issue #3402972: fix file conversion image style support
-
recrit β
committed 28f616d8 on 2.1.x
- Status changed to Fixed
7 months ago 5:05pm 27 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
6 months ago 4:02pm 15 December 2023 - πΊπΈUnited States smustgrave
May have to revert this as it caused a regression π Regression - Local files with a dot in their filenames are not correctly served Active if a quick solution can be found over there can leave this in.
- πΊπΈUnited States recrit
@smustgrave the entire patch for this issue may not need reverted. I believe we might just need to revert this line change:
src/EventSubscriber/StageFileProxySubscriber.php: ~ line 190- if ($config->get('use_imagecache_root')) { + if ($config->get('use_imagecache_root') && $unconverted_path === $relative_path) {
- πΊπΈUnited States smustgrave
If I revert that in the other issue, does this one still work for you?
- πΊπΈUnited States recrit
@smustgrave Yes, this issue 3402972 is still fixed with the updates in #8
- π§πͺBelgium herved
Hi @recrit, @smustgrave,
The suggestion in #8 doesn't seem to fix π Regression - Local files with a dot in their filenames are not correctly served Active .
Files with a dot are still "hotlinked" without the extension for me.
E.g: some.image.png?itok=**** > some.image?itok=**** - π³π±Netherlands idebr
This issue adds an additional path to check for all files. All paths that are not available on the origin trigger an exception. As a result, the watchdog is now filled with Stage file proxy exceptions.
- Status changed to Needs work
5 months ago 7:35pm 18 January 2024 - πΊπΈUnited States smustgrave
Since this issue has been merged for 2 months almost, reluctant to fully revert so would like to see if we can find a solution for both.
- πΊπΈUnited States smustgrave
@idebr can you post the error though. Then we can try and figure it out.
- πΊπΈUnited States smustgrave
Also @herved and @idebr does reverting this solve both issues?
- π³π±Netherlands idebr
Stage File Proxy is now pinned to version 2.1.2 for my project to prevent the watchdog spam. A watchdog entry looks like this:
Type stage_file_proxy Date 22 January 2024 - 11:27 User admin Location http://bamaco.localhost/sites/default/files/styles/original_image/public/new800x300.png?itok=D1Gc_UaD&mt= Referrer http://bamaco.localhost/ Message Stage File Proxy encountered an error when retrieving file https://www.uu.nl/sites/default/files/new800x300.png. Client error: `GET https://www.uu.nl/sites/default/files/./new800x300?mt=&itok=D1Gc_UaD` resulted in a `404 Not Found` response: <!DOCTYPE html><html lang="nl" dir="ltr" prefix="og: https://ogp.me/ns#"><head><link rel="preload" as="font" type="font/ (truncated...) in GuzzleHttp\Exception\RequestException::create() (line 113 of /Users/idebraakman/git/uu_bamaco/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php). Severity Error
- πΊπΈUnited States smustgrave
- πΊπΈUnited States smustgrave
Did a release for 2.1.4 with this reverted
I still have this problem with 2.1.4, it is unclear to me if I can do anything about it or not, but here is the error:
Stage File Proxy encountered an error when retrieving file https://www.***.***/sites/default/files/styles/large/public/2024-02/myfi.... Client error: `GET https://www.***.***/sites/default/files/styles/large/public/2024-02/myfi...` resulted in a `404 Not Found` response:
The GET request misses the .png extension of the file.
- πΊπΈUnited States smustgrave
I reverted the change from this ticket as it caused other failures. So this solution may be on track but needs work.
- πΊπΈUnited States recrit
In case anyone is looking for the functionality of this patch, I have attached a patch that works with the latest 2.1.x-dev which still has the method for "getFilePathWithoutConvertedExtension".
- πͺπΈSpain Carlos Romero
Carlos Romero β made their first commit to this issueβs fork.
- πͺπΈSpain Carlos Romero
With 2.1.4 on drupal 10.2 get error when apply the patch, i was updated the 2.1.x branch and reroll the patch
- Status changed to RTBC
about 1 month ago 1:40pm 14 May 2024 - π΅πΉPortugal saidatom Lisbon
RTBC #24 - https://www.drupal.org/files/issues/2024-03-29/stage_file_proxy-3402972-... β works fine
- Status changed to Needs work
about 1 month ago 6:31pm 15 May 2024 - π§πͺBelgium herved
This is still causing issues for me.
With both hotlink and use_imagecache_root set to TRUE, and using a file with a dot in its name e.g.: foo.bar.jpg it redirects to foo.bar and wrongly strips the extension (expected is foo.bar.jpg).
You can replicate this with an image field directly with the widget preview (using thumbnail image style which doesn't use any image_convert effect).
Can anyone else confirm this? I'm moving this back to needs work for now.If I understand correctly, there are multiple scenarios depending on hotlink=TRUE/FALSE and use_imagecache_root=TRUE/FALSE.
Also I wonder, why would this be limited to webp? I suspect it is applicable to any image style using the image_convert effect (which can have many more supported extensions like webp, png, jpeg, jpe, gif,..). - Status changed to Postponed: needs info
16 days ago 12:07am 31 May 2024 - πΊπΈUnited States smustgrave
Fix appears to be the same solution posted here π¬ Webp images are not getting generated locally. Active
Can someone test that ticket please.
- π§πͺBelgium herved
#29 still holds true, for me.
I'll crosslink it there. - Status changed to Needs work
16 days ago 2:39pm 31 May 2024 - πΊπΈUnited States smustgrave
Seems still an issue. Closing the other issue as duplicate