diff --git a/core/modules/locale/src/StringDatabaseStorage.php b/core/modules/locale/src/StringDatabaseStorage.php index 058c689..a90077d 100644 --- a/core/modules/locale/src/StringDatabaseStorage.php +++ b/core/modules/locale/src/StringDatabaseStorage.php @@ -462,6 +462,15 @@ protected function dbStringSelect(array $conditions, array $options = array()) { * If the string is not suitable for this storage, an exception is thrown. */ protected function dbStringInsert($string) { + // Issue #1885192: Field locales_source.source is not suitable for long + // texts and huge config objects. + // + // Work-around: Don't save strings that are greated the 64bk. + // (65536 = 64 kb * 1024 bytes) + if (Unicode::strlen($string->getString()) > 65536) { + $string->setString(''); + } + if ($string->isSource()) { $string->setValues(array('context' => '', 'version' => 'none'), FALSE); $fields = $string->getValues(array('source', 'context', 'version'));