I wanted to change the default upload limit, whatever input i used, also when i cange nothing, following error appereared:

/admin/config/media/file-settings
The website encountered an unexpected error. Please try again later.
Drupal\Core\Config\ImmutableConfigException: Can not set values on immutable configuration file_entity.settings:max_filesize. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object in Drupal\Core\Config\ImmutableConfig->set() (line 32 of core/lib/Drupal/Core/Config/ImmutableConfig.php).

When i go back to the previous page D8 shows following warning :

Warning: Invalid argument supplied for foreach() in Drupal\Core\Form\FormValidator->doValidateForm() (line 280 of core/lib/Drupal/Core/Form/FormValidator.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MartinMa created an issue. See original summary.

acke’s picture

Status: Active » Needs review
FileSize
883 bytes

This patch change FormBase to ConfigFormBase.

esolitos’s picture

I tested your patch and it looks all good, I'm using in production since a fre days now w/o any issue.

I added to the patch also a fix for the #element_validate which needs to be an array.

Berdir’s picture

Status: Needs review » Fixed

Looks good, thanks.

  • Berdir committed ee9cd3b on 8.x-2.x authored by esolitos
    Issue #2650854 by acke, esolitos: ImmutableConfigException on "File...

Status: Fixed » Closed (fixed)

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