Problem/Motivation

#3532099: Support creating a revision and setting revision log message was a great addition. I just thought, after merging and tagging it, that it might fail on entities that don't have revisions enabled.

I don't know if it'll be a graceful fail (do nothing) or a hard fail (throw exception), so let's use this to test this case and fix it if needed.

Steps to reproduce

Use the new revision fields on non-revisionable entities.

Proposed resolution

Use the "isRevisionable" method before setting the revision fields.

if ($this->entityType->isRevisionable()) {
...

If entities are not revisionable, we should probably add something via the messenger service to let users know about it (eg: "We could not create a revision on X because it's not configured to be revisionable").

Remaining tasks

Test and MR.

Comments

fjgarlin created an issue. See original summary.

bkosborne’s picture

I thought this to, but the action plugin this module provides is currently applicable to nodes, which all have revision support.

So I think we can close this, or perhaps we change this issue to make the module work with other entity types? Though, at the moment I have no need for that, and prefer to keep the module as simple an narrow in scope as possible. There is Views Bulk Edit that works with all entity types and has many more features that people could use as well.

fjgarlin’s picture

Status: Active » Closed (won't fix)

Agree to keep things simple. Thanks for confirming. Closing as no action is needed.