Stream wrappers not registered when installing module's default config

Created on 24 January 2024, 5 months ago
Updated 27 February 2024, 4 months ago

Problem/Motivation

Discovered in ✨ [PP-1] Mark parts of CKEditor 5 and Editor config schema as fully validatable Postponed .

That issue added validation for editor.editor.*:image_upload.scheme: that must be one of the registered StreamWrapperInterface::WRITE_VISIBLE stream wrappers.

However, it appears that in some scenarios, the public stream wrapper is present in \Drupal\Core\StreamWrapper\StreamWrapperManager::$info but absent from \Drupal\Core\StreamWrapper\StreamWrapperManager::$wrappers, which causes \Drupal\Core\StreamWrapper\StreamWrapperManager::getNames(StreamWrapperInterface::WRITE_VISIBLE) to return … nothing! 😱

Consequence: a validation error like this is generated:

The file storage you selected is not a visible, readable and writable stream wrapper. Possible choices: <em class="placeholder"></em>.

… because there are no possible choices πŸ˜…

Steps to reproduce

Remove

    'editor.editor.*' => [
      'image_upload.scheme' => [
        '^The file storage you selected is not a visible, readable and writable stream wrapper\. Possible choices: <em class="placeholder"><\/em>\.$',
      ],
    ],

from \Drupal\Core\Config\Schema\SchemaCheckTrait::$ignoredPropertyPaths.

A number of tests will fail.

Proposed resolution

TBD

Merge request link

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
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.

Production build 0.69.0 2024