Commit 474ed068 authored by Adam Shepherd's avatar Adam Shepherd Committed by Adam Shepherd
Browse files

Issue #3315497 by jcnventura, AdamPS: Mismatched entity and/or field definitions

parent 4d39b4be
Loading
Loading
Loading
Loading
+10 −0
Changes for simplenews.install: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -395,3 +395,13 @@ function simplenews_update_830008() {
  $entity_type->set('entity_keys', $entity_keys);
  \Drupal::entityDefinitionUpdateManager()->updateEntityType($entity_type);
}

/**
 * Fix 'uuid' entity key for subscriber.
 */
function simplenews_update_830009() {
  // The code in simplenews_update_830008() should be enough, but we have to
  // update the field storage too, see https://www.drupal.org/node/2554097.
  $manager = \Drupal::entityDefinitionUpdateManager();
  $manager->updateFieldStorageDefinition($manager->getFieldStorageDefinition('uuid', 'simplenews_subscriber'));
}