diff --git a/core/modules/filter/filter.install b/core/modules/filter/filter.install index 954b0c4..b5ad93a 100644 --- a/core/modules/filter/filter.install +++ b/core/modules/filter/filter.install @@ -12,6 +12,8 @@ * @see core/modules/filter/config/filter.format.plain_text.yml */ +use Drupal\Component\Uuid\Uuid; + /** * Implements hook_schema(). */ @@ -44,6 +46,7 @@ function filter_update_8000() { * @ingroup config_upgrade */ function filter_update_8001() { + $uuid = new Uuid(); $result = db_query('SELECT * FROM {filter_format}', array(), array('fetch' => PDO::FETCH_ASSOC)); foreach ($result as $filter_format) { // Find the settings for this format. @@ -58,9 +61,13 @@ function filter_update_8001() { $filter_format += array( 'filters' => $filters, 'roles' => drupal_map_assoc(array_keys(user_roles(FALSE, 'use text format ' . $filter_format['format']))), + 'uuid' => $uuid->generate(), ); - $format = entity_create('filter_format', $filter_format); - $format->save(); + $config = config('filter.format. ' . $filter_format['name']); + foreach ($filter_format as $key => $value) { + $config->set($key, $value); + } + $config->save(); } }