The module settings has max_filesize cast as an integer, but the schema for it is expecting a string

Created on 16 November 2023, about 1 year ago
Updated 29 November 2023, about 1 year ago

Problem/Motivation

In the schema, max_filesize has the type set as a string, however in file_entity.settings, it's being cast as an integer.

Steps to reproduce

When installing the config for the file_entity module inside of a kernel test (like so $this->installConfig('file_entity')), we are being presented with the error:

Exception: Exception when installing config for module file_entity, message was: Schema errors for file_entity.settings with the following errors: file_entity.settings:max_filesize variable type is integer but applied schema class is Drupal\Core\TypedData\Plugin\DataType\StringData

Proposed resolution

To fix the issue, change max_filesize in file_entity.settings.yml to be a string.

Remaining tasks

  • Create and add the patch.
  • Test the updated module thoroughly to ensure that the fix is working as intended.

User interface changes

There are no user interface changes with this fix.

API changes

There are no API changes with this fix.

Data model changes

There are no data model changes with this fix.

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇦🇺Australia hoffismo Brisbane, Queensland

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

Comments & Activities

Production build 0.71.5 2024