Closed (outdated)
Project:
S3 File System
Version:
8.x-2.0-alpha0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2017 at 06:18 UTC
Updated:
11 Jul 2018 at 13:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jansete commentedIn alpha2 image styles generation changed enterily. Maybe you have refresh cache and if you cache your php code, reload your php service.
Comment #3
kevla commentedHmm no reloading cache doesn't seem to fix it.
Comment #4
jansete commentedCan you tell us more info? How do you work with the images or files in the project? Steps to reproduce?
Comment #5
kevla commentedDebugging this further, has the uri scheme changed from s3fs to s3?
More info to follow in a sec. Might be quite time consuming to find a give you a vanilla situation to reproduce this so I'm going to try and debug it first.
Comment #6
kevla commentedAh I think I know what the matter is.
It's a difference between 8.x-2.0-alpha0 and 8.x-3.0-alpha3
The scheme is totally changed. I guess I am locked in version 2?
Comment #7
jansete commentedYes kevla, you can replace all your s3fs_file register and file_managed from s3fs to s3, because in 8.x-2.x it was wrong.
Make backups before that. 8.x-2.x is not more supported.
Comment #8
jansete commentedComment #9
andreyks commentedUpdating for drupal 8.5.1
Comment #10
andreyks commentedComment #11
jansete commentedHi andreyks the patch is for core? So it shouldn't be in this module.
Comment #12
chuckienorton commentedI am getting the same error after updating.
Re jansete's comment
- is it possible to elaborate? Are you referring to settings.php configs?
For reference - i'm updating from drupal 8.2 -> 8.5.1, and s3fs 2.x-dev (not sure which version) -> 3.x-dev (now 8.x-3.0-alpha9)
Comment #13
hamilti commentedMy issue was completely unrelated to S3. Patch #9 worked for me. After a recent core update the problem occurred and is simply due to a missing image in the files folder, a fairly simple but major problem I think. The presence of the file needs to be tested first - clearly this is a core issue. How do we get that added?
UPDATE: Further testing shows that this while the above fixes the immediate frontend display problem, I cannot admin the custom block to add the image. This problem has already been identified in core Url.php and documented here: https://www.drupal.org/project/drupal/issues/2953330
Comment #14
chuckienorton commentedRE:
I found the solution to this if you're updating from a version previous to s3fs 3 - here is an sql query to replace all the s3fs references with s3. Just run this on your database.
If this is incorrect, admins, please let me know. I'm curious as to why this wasn't handled during an update.
Comment #15
nashkrammer commentedHi chuckienorton,
Your solution worked for me. Though after running the update query on file_managed and s3fs_file tables, issue was resolved and s3 file were fetched properly but for very few files the url appears as below
<img property="schema:image" src="/s3/files/styles/large/s3/2018-06/filename.png?itok=Yk0475fa" width="480" height="269" alt="sample" typeof="foaf:Image" class="image-style-large">I checked the filename it does exist on s3 bucket but url itself is not formed correctly for them. Any pointer could really help. Thank You.
-Avinash
Comment #16
jansete commentedHi @nashkrammer,
/s3/files/styles/large/s3/2018-06/filename.png is a route callback to generate image style, it belongs drupal instead bucket, the second time when image style had been generated in the bucket, the url will change to the final bucket url (yes, now is in the bucket).