Readonly property cannot be initialized

Created on 20 August 2025, 12 days ago

In our project we have the following failure uploading a file:

Error: Cannot initialize readonly property Drupal\babel\BabelLocaleTranslation::$babelStorage from scope Drupal\locale\LocaleTranslation in Drupal\locale\LocaleTranslation->__wakeup() (line 81 of core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php).

unserialize() (Line: 21)
Drupal\Component\Serialization\PhpSerialize::decode()
array_map() (Line: 79)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->getMultiple() (Line: 35)
Drupal\Core\KeyValueStore\StorageBase->get() (Line: 150)
Drupal\Core\Form\FormCache->loadCachedFormState() (Line: 123)
Drupal\Core\Form\FormCache->getCache() (Line: 456)
Drupal\Core\Form\FormBuilder->getCache() (Line: 270)
...

We need to relax the "readonly" directive until there will be a way to serialize such classes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024