Problem/Motivation
Notice shows everywhere where S3 is used,making the site unusable.
Steps to reproduce
When updating existing projects to Drupal 9 (without reinstalling the module), the notice shows everywhere.
Issue is caused because the code is certain that there is an array key "use_path_style_endpoint",
Proposed resolution
Check if the array key exists and then continue with the if statement.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | notice-path_style_endpoint-3232039-1.patch | 740 bytes | marijan gudelj |
Comments
Comment #2
marijan gudeljComment #3
marijan gudeljThere is the proposed fix of the issue.
Comment #4
cmlaraI won't disagree that we can check the value there to be sure it is set, however I'm curious as to what was the scenario of your upgrade to D9? From what starting Drupal version and what version of S3FS and what were the final versions of each so I can understand if there is possible a larger issue somewhere that needs to be looked into or not.
Comment #5
marijan gudeljSite was running od drupal/core 8.9.16 and s3fs was dev-3.x
After upgrading to core 9.2 and s3fs ^3.0@beta this occured.
Comment #7
cmlaraI've pushed this in. I did switch to a !empty() test to match the rest of the code style in the file.
use_path_style_endpoint was never given a schema update hook. Since it was an Alpha I can see why that was the case. Given the length of time since the option was added I didn't see a need to add it now as the empty check will solve that and the option has existed for 2 years.
The only time I could see that would be reproducible would be if upgrading from prior to Alpha 14 and not having saved the config via the GUI. I do not expect this to occur too often and should be a non-issue when we hit stable. I could not find any other possible case where this would occur.