Mercurial > hg > cmmr2012-drupal-site
diff core/modules/media/src/MediaSourceBase.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/modules/media/src/MediaSourceBase.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/media/src/MediaSourceBase.php Thu Feb 28 13:11:55 2019 +0000 @@ -301,7 +301,9 @@ * returned. Otherwise, a new, unused one is generated. */ protected function getSourceFieldName() { - $base_id = 'field_media_' . $this->getPluginId(); + // Some media sources are using a deriver, so their plugin IDs may contain + // a separator (usually ':') which is not allowed in field names. + $base_id = 'field_media_' . str_replace(static::DERIVATIVE_SEPARATOR, '_', $this->getPluginId()); $tries = 0; $storage = $this->entityTypeManager->getStorage('field_storage_config');