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

Created on 2 May 2017, over 7 years ago
Updated 26 April 2024, 8 months 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 about 17 hours 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.71.5 2024