Problem/Motivation
#2544790: ContentEntityBase::setNewRevision(FALSE) is broken if ::setNewRevision(TRUE) was called previously just landed, and that unblocked #1863258: Move entity preparation from form controller to entity class: "last changed" timestamp not updated and "create new revision" setting not respected when updating entities via Entity API. The reason that was originally created, was Quick Edit, and specifically, the limitation this issue title describes: Quick Edit only creates revision for Node entities, should do it for all content entity types that support it
In working on that, I
- noticed that #2666808: Add a revisionable entity base class and log interface and #2669802: Add a content entity form which allows to set revisions from the Workflow Initiative were also a significant help.
- this issue would in fact also help the Workflow Initiative, by having all entity types, and not just nodes, respect the revision-related functionality of all content entity types in Quick Edit
This issue was originally created against the entity system component, and was a blocker to improved quickedit.module functionality (and maintainability) as well as rest.module.
Proposed resolution
Remove all special handling for node, make it work for all entity types!
Remaining tasks
- Reviews.
- Tests.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2925846-3.patch | 5.89 KB | wim leers |
Comments
Comment #2
wim leersComment #3
wim leersWe can also solve #2823604: revision_timestamp is not set to current time when quick editing (it stays unchanged) now without doing it in a
Node-specific way!(Lifted some code from @Grayside's patch at #2838395: [PP-1] Entity API bug affecting REST: "last changed" timestamp not updated and "create new revision" setting not respected when PATCHing via REST.)
Comment #4
wim leersComment #6
timmillwoodMoving back to "needs work" for the tests.
Comment #14
spokjeDue to Quickedit being moved out of Drupal Core and into a Contrib Module, moving this issue to the Contrib Module queue.