Problem/Motivation
Currently converting an entity type to revisionable does not work for an entity with an integer ID.
SqlContentEntityStorageSchemaConverter::convertToRevisionable()
(to be precise: SqlContentEntityStorageSchemaConverter::copyData()
contains the following:
// Set the revision ID to be same as the entity ID.
$entity->set($revision_id_key, $entity_id);
The revision ID is always an integer, but the entity ID may be a string, in which case this will break.
Proposed resolution
?
Issue fork drupal-2874789
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
Comment #2
tstoecklerComment #17
SpadXIII CreditAttribution: SpadXIII as a volunteer commentedRan into this issue myself as well, I've added a small patch that helped me with making my entity type (that uses a machine-name as id) revisionable
I haven't added any tests, just a POC that seems to work good enough for me to continue :)