Problem/Motivation

Storage entities are technically revisionable, and implementations using Inline Entity Form are able to create revisions. But there's no option to create a new revision on the storage entity's own edit form.

Steps to reproduce

Go to /storage/1/edit, see that there's no "Create new revision" checkbox.

Proposed resolution

Ideally, this would be an interface element that could be toggled on a per-bundle basis, similar to how Content bundles do it.

One possible issue is that we probably don't want to see a "Create new revision" checkbox when editing the entity via an IEF widget. In those cases, we always should apply the IEF widget setting for revisions.

Remaining tasks

Get maintainer feedback, write a patch.

User interface changes

Add "Create new revision" checkbox to the edit form.

API changes

Data model changes

Comments

Les Lim created an issue. See original summary.

mandclu’s picture

Status: Active » Needs review
StatusFileSize
new5.17 KB

This patch adds configuration options:

  1. Whether a revision should be saved by default
  2. Whether the revision toggle should be shown
  3. Whether the revision log message textarea should be shown

Please test and let me know if additional changes are needed.

andileco’s picture

Assigned: Unassigned » andileco

I'll test this; however, I'm not currently using IEF, so if someone is using that, I recommend they do a second round of testing after I complete mine.

mandclu’s picture

I will confess that I'm not super familiar with how IEF is supposed to work with respect to revisions, but I did do some testing with it and this patch. Here's what I discovered:

  • When using IEF, the new revision checkbox is never exposed. This seems like expected behaviour
  • IEF also seems to override the behaviour of whether or not a new revision will be created. In other words, if a storage type is set to always create a new revision but the iEF widget is not, a new revision will not be created on save. Conversely, if a storage type is configured to not create a new revision on save but the IEF widget is, a new revision will be created

I don't personally see anything of concern in here, but would welcome other input.

  • mandclu authored 55ab6cf on 1.0.x
    Issue #3209333 by mandclu: Missing "Create new revision" option on...
mandclu’s picture

Assigned: andileco » Unassigned
Status: Needs review » Fixed

I decided to go ahead and get this merged in so I could get out a stable release. If you have the time to test it that would be great, and feel free to open an issue for anything you find.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.