Problem/Motivation

The following error is present on validate() even if the setting is enabled.

Enable this option to store all files as private files in S3. To enable this feature include the following in settings.php:

Important:If you enable this feature you can't enable 'use_s3_for_public'.
\$settings['s3fs.upload_as_private'] = TRUE;"

Steps to reproduce

Bucket that does not allow public files run a config validation test.

Proposed resolution

in validate() check for s3fs.upload_as_private instead of looking at the config array passed in.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

cmlara created an issue. See original summary.

cmlara credited yijiang.

cmlara’s picture

StatusFileSize
new538 bytes

Looks like this occurred when working on #3185760: Allow read only use of S3 bucket

I'm guessing I thought that we would be passing in the config setting as part of the validation (because its on the form) forgetting that the form doesn't get directly passed only the config array gets passed.

I'm going to be looking forward to 4.x when everything is part of the config entity....

cmlara’s picture

Version: 8.x-3.x-dev » 8.x-3.0-beta1
Status: Active » Needs review

cmlara credited Darvanen.

cmlara’s picture

Title: Validate() does not get passed upload_as_private when validating from actions page » upload_as_private not respected for validate(), S3fsFileService, and S3fsFileMigrationBatch
Status: Needs review » Needs work

Opening this bug up a bit more as its actually bigger than first seen.

S3fsFileService was directly copied S3fsFileMigrationBatch so it makes sense that this error would exist in both locations.

Root Fault Analysis:
It appears that somewhere along the lines I started thinking that this value was passed around as part of the configuration instead of with settings and that error propagated through the rest of the code. This possibly may have been caused by the fact it shows up in the constructor of S3fsStreamWrapper as part of the configuration array. In either case it was ultimately caused by copying the same code into multiple places.

Once fixed this will trigger a Beta2 due to severity.

cmlara’s picture

  • cmlara committed 8e18a40 on 8.x-3.x
    Issue #3223654 by cmlara, yijiang, Darvanen: upload_as_private not...

  • cmlara committed 8e18a40 on 4.0.x
    Issue #3223654 by cmlara, yijiang, Darvanen: upload_as_private not...
cmlara’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.