EntityDefinitionUpdateManager cannot make User Entity Type revisonable

Created on 17 August 2021, over 3 years ago
Updated 24 February 2023, about 2 years ago

Problem/Motivation

I am trying to modernize the user_revision module See this Merge Request

Sadly the entityDefinitionUpdateManager while inserting the new revision ids into the database, uses the entity id as the revision id. Usually not a problem, but there exists a user with uid 0, so it tries to insert revision_id 0 which fails.

Steps to reproduce

Clone my user_revision branch from above and try to enable the module (anon user and admin need to already exist in database)

Proposed resolution

Add +1 to the revision id while inserting the new revision. I will create a MR

Remaining tasks

created a Drupal 9 Branch too

User interface changes

none

API changes

none

Data model changes

none (well I needed to modify the EntityTestUpdate Entity Storage so I can insert an entity with id 0)

Release notes snippet

Allow EntityDefinitionUpdateManager to make User Entity Type revisonable with data

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
Database updateΒ  β†’

Last updated 25 days ago

No maintainer
Created by

hoanns Dresden

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Did not test
    Can the MR be updated for 10.1 please.

    Since all the tests had to be updated wonder if this will need a change record, what happens when that value is not included? Will need to cover that.

  • Status changed to Closed: outdated about 2 years ago
Production build 0.71.5 2024