The entity type [entity name] does not have an "revision_created" entity revision metadata key
Asked Answered
J

1

8

I am using Drupal 9.0.5 as recommends Drupal site. I created a first entity content type, but I got the message "The entity type [entity name] does not have an "revision_created" entity revision metadata key.".

Jellied answered 13/9, 2020 at 11:26 Comment(4)
If this is a question, then it is a very strange one.Kizer
It is a issue, with the solution. A information for guys like me who would have been blocked.Jellied
@Jaskin, Please add the solution for your problem as an answerIlex
This worked for me in @[EntityType]Entity rather than @ContentEntityType. ThanksTamaratamarack
H
1

Here is the answer that was added into the question originally:

I solved this problem by adding this in my entity file (in @ContentEntityType) :

 * revision_metadata_keys = {
 *     "revision_user" = "revision_user",
 *     "revision_created" = "revision_created",
 *     "revision_log_message" = "revision_log"
 *   },

Perhaps that could help somebody.

Hackbut answered 3/8, 2021 at 20:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.