Problem/Motivation

Subscriber::uuid() returns NULL.

Cause

Subscriber:

 * @ContentEntityType(
 *   id = "simplenews_subscriber",
...
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "mail"
 *   },

ContentEntityBase:

public function uuid() {
  return $this
    ->getEntityKey('uuid');
}

Proposed resolution

Add the entity key.

Issue fork simplenews-3266989

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonathanshaw created an issue. See original summary.

berdir’s picture

Defining the key results in adding a key and schema changes and requires an update function.

adamps’s picture

Status: Active » Needs work

Needs work for #3

jonathanshaw’s picture

Status: Needs work » Needs review
jonathanshaw’s picture

Thanks for the feedback, done.

adamps’s picture

Status: Needs review » Fixed

Thanks

  • AdamPS committed 94a1030 on 3.x authored by jonathanshaw
    Issue #3266989 by jonathanshaw, Berdir: Subscriber does not declare uuid...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

adamps’s picture

jjancel’s picture

simplenews module
830009 - Fix 'uuid' entity key for subscriber.
Failure : Drupal\Core\Entity\EntityStorageException : The uuid column cannot have NOT NULL constraints as it holds NULL values.