Problem/Motivation

After installing Gutenberg, drush config:inspect --detail --only-error reports a validation error for the Gutenberg editor configuration. Before enabling Gutenberg, config inspection reports no errors.

---------------------------------------- ---------------- ------------- ------------------------------------------------------------------- 
  Key                                      Status           Validatable   Data                                                               
 ---------------------------------------- ---------------- ------------- ------------------------------------------------------------------- 
  editor.editor.gutenberg                  Correct          89%           1 errors                                                           
   editor.editor.gutenberg:image_upload.   Correct          Validatable   This value must be a number of bytes, optionally with a unit such  max_size                                                    as "MB" or "megabytes" does not represent a number of bytes.                                       
 

Steps to reproduce

  1. Fresh Drupal 11.x site, PHP 8.3.
  2. Run: composer require 'drupal/gutenberg:^4.0@beta'
  3. Run: drush en -y gutenberg
  4. Run: drush config:inspect --detail --only-error
  5. Observe the editor.editor.gutenberg:image_upload.max_size validation error.

Proposed resolution

Ensure that image_upload.max_size has a valid default value, such as a valid byte size or an empty value accepted by the schema.

Environment

  • Drupal core: 11.3.12
  • Gutenberg: 4.0.x (^4.0@beta)
  • PHP: 8.3
  • Drush: config:inspect (config_inspector module)

Issue fork gutenberg-3605268

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dkmishra created an issue. See original summary.

nakaza sora’s picture

Assigned: Unassigned » nakaza sora

nakaza sora’s picture

Assigned: nakaza sora » Unassigned
Status: Active » Needs review

Changed the default `image_upload.max_size` from `''` to `null`, which the core `bytes` schema accepts (empty string does not). Verified locally that the validation error is gone. MR is ready for the 4.0.x branch — please review when you have a chance. Thanks!

  • nakaza sora committed 58a0203b on 4.0.x
    Issue #3605268: Fix invalid default value for image_upload.max_size
    
marcofernandes’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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