This is a follow-up to #2144631: Add a revisionable key to field definitions, which got committed without having all field definitions updated. Let's mark this as novice - maybe someone wants to pick up here?
What's left:
- Go through all content entities and update the base field definitions to set all fields that are stored revisionable as revisionable
- To know whether a base field is revisionable, one can lookup the entity type's database table schema. Everything in the data or revision table should be marked revisionsable.
Comment | File | Size | Author |
---|---|---|---|
#21 | block-language.png | 26.96 KB | jessebeach |
#19 | interdiff-10-19.txt | 442 bytes | czigor |
#19 | core-revisionable_fields-2225699-19.patch | 2.89 KB | czigor |
#10 | interdiff-5-10.txt | 2.12 KB | czigor |
#10 | core-revisionable_fields-2225699-10.patch | 3.62 KB | czigor |
Comments
Comment #1
plachCore revisionable entity types are:
The actual tables to check are named
ENTITY_TYPE_revision
.Comment #2
czigor CreditAttribution: czigor commentedWorking on this.
Comment #3
plachComment #4
czigor CreditAttribution: czigor commentedComment #5
czigor CreditAttribution: czigor commentedAdded the ->setRevisionable(TRUE); call for the above entities' revisionable fields. I have not found any other revisionable entities.
setRevisionable(TRUE) is not called for id and revision id fields.
Comment #6
czigor CreditAttribution: czigor commentedComment #8
plach5: core-revisionable_fields-2225699-5.patch queued for re-testing.
Comment #9
plachThanks for the patch! There are just a couple of issues to fix:
node.langcode
should be revisionable.There is no need to reassign field definitions, enabling the revisionable property is enough.
Comment #10
czigor CreditAttribution: czigor commentedThanks for the review! Fixes are in the attachment.
Comment #11
czigor CreditAttribution: czigor commentedComment #13
czigor CreditAttribution: czigor commented10: core-revisionable_fields-2225699-10.patch queued for re-testing.
Comment #15
czigor CreditAttribution: czigor commented10: core-revisionable_fields-2225699-10.patch queued for re-testing.
Comment #16
czigor CreditAttribution: czigor commentedComment #17
jessebeach CreditAttribution: jessebeach commentedComment #18
fagoPatch looks good to me.
That should be already revisionable from the parent. Else patch looks good to me.
Comment #19
czigor CreditAttribution: czigor commentedComment #20
plachThanks!
Comment #21
jessebeach CreditAttribution: jessebeach commentedNode sets
langcode
to be revisionable.but
CustomBlock
does not:Seems like CustomBlock should also set langcode to revisionable? They can be varied by language and revisioned by language.
Comment #22
plachLet's stick to the currently implemented schema for now so we don't introduce inconsistencies: custom block language is not revisionable atm, we can fix it when we have entity schema generation in place :)
We are merely describing the current schema here.
Comment #23
plachComment #24
fagoyep, #21 is a good point - but as this issue is just about adding metadata for what's there it should be fixed in its own issue.
Comment #25
jessebeach CreditAttribution: jessebeach commentedOk, I can live with that since #2144263: Decouple entity field storage from configurable fields is also a beta blocker, so it will get done.
Comment #26
jessebeach CreditAttribution: jessebeach commentedxpost
Comment #27
jessebeach CreditAttribution: jessebeach commentedIf this is a
beta blocker
, it is then by definition alsoCritical
.Comment #28
jessebeach CreditAttribution: jessebeach commentedSorry, I was going to post a patch with the changed schema, but decided against it after plach's comment in #22. But my form still wanted to upload the files. So I'm hiding them now. The patch in #19 is the one to commit.
Comment #30
jessebeach CreditAttribution: jessebeach commentedA related issue for
custom_block
revisioning bylangcode
.#2226445: The custom_block entity should include langcode in the set of properties included in a revision entry
Comment #32
catchThanks!