StreamWrappers not updated until cache reset

Created on 25 March 2019, over 6 years ago
Updated 13 June 2025, about 2 months ago

While developing a test for contrib, I'm running into an problem with stream wrappers gone missing.
If a stream wrapper (e.g. but not limited to private://) for some reason becomes unavailable, it is only after a cache flush that Drupal takes notice. Therefore, the user runs into related error messages before it is possible to inform them about the real problem.

This is however not only a problem for contrib, and in the case of the Core private:// wrapper, the UI is particularly inconsistent.

Once 'file_private_path' is set in settings.php, the file system settings page immediately takes notice of the present path (and resets the default to public://, if private:// doesn't exist anymore).

However StreamWrapperManager::getWrappers() doesn't update the list of stream wrappers until a cache reset, leading to the following Usability bug:

Private path present but scheme missing:

Private path missing but scheme present:

(Screenshots are D8.6, but bug is still present in D8.8.)

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

file system

Created by

Pancho UTC+2 πŸ‡ͺπŸ‡Ί EU

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This came up as a daily BSI target

    1. Wonder since this was reported for D8 if still an issue in D11?
    2. Can the issue summary be updated ot us the standard template
    3. When updating the summary can we get steps that are causing this

Production build 0.71.5 2024