s3fs uninstall (module needs documentation to address old field settings)

Created on 20 July 2023, over 1 year ago
Updated 16 August 2023, about 1 year ago

Problem/Motivation

Uninstalling s3fs needs documentation (or better way to notify user of field settings that need to be updated manually upon uninstall).
Otherwise there is an error upon save for old content types that relied on s3fs before .

500 error upon saving a node from drupal core was like so (note STREAM was my individual s3 one)
Drupal\Core\File\Exception\InvalidStreamWrapperException: Invalid stream wrapper: STREAM in Drupal\file\FileRepository->writeData()

Steps to reproduce

Uninstall s3fs. Afterwards specific fields within a content type that were before configured to use s3 now bug out upon save. In my use case I had a PDF upload field that would upload to s3

Gist of it (to fix) is go to (note CONTENT_TYPE is something else on my drupal and FIELDNAME )
WEBSITE/admin/structure/types/manage/CONTENT_TYPE/fields/node.CONTENT_TYPE.field_FIELDNAME/storage

Click on tab "Field Settings"

"Upload destination" setting must now be manually checked to "Public Files" once more (radio button was blank)

Click "Save" and it's fixed

Proposed resolution

Short term maybe just put it on the Readme for known issue. (To warn other poor unfortunate souls that stumble upon this).

Better solution is maybe upon uninstall those field settings somehow revert to the basic public file system in the module uninstall hook.
Just documenting in ticket to maybe help some poor unfortunate soul in the future.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

3.0

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @meangreen
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Uninstalling s3fs needs documentation

    We do have an UNINSTALLING section in the readme and it does call out needing to adjust fields:
    https://git.drupalcode.org/project/s3fs/-/blob/8.x-3.x/README.txt?ref_ty...

    Is there a specific change to the documentation that you believe may have helped you better understand the need to adjust all fields?

  • Status changed to Closed: duplicate over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    As no additional information has been provided in over 2 weeks I'm going to close this as a duplicate of our existing instructions.

    If you can provide additional suggestions to improve the documentation please re-open the issue.

  • Well I mean this line maybe handles it in the readme

    In addition, you must ensure no fields or system components are configured to
    utilize s3:// for file storage
    , technically it works, but it's kinda vague imo for those less technical users, I'd add a line with an example like

    You'll have to manually go into each field that was uploading to s3 EX
    "WEBSITE/admin/structure/types/manage/CONTENT_TYPE/fields/node.CONTENT_TYPE.field_FIELDNAME/storage

    Click on tab "Field Settings"

    "Upload destination" setting must now be manually checked to "Public Files" once more (radio button was blank)

    Click "Save"

    --
    Just to be helpful, so technically the 1 line in the readme calls it out, but it's just not too useful to someone in a jam

  • Status changed to Active about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Moving back to active so this shows up in the issue list again.

Production build 0.71.5 2024