Make converting entities to revisionable work for entities with non-integer IDs

Created on 2 May 2017, about 7 years ago
Updated 26 April 2024, about 1 month ago

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

?

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated 1 day ago

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024