diff --git a/src/Commands/core/EntityCommands.php b/src/Commands/core/EntityCommands.php index 6c414f2c81..6846b8d01b 100644 --- a/src/Commands/core/EntityCommands.php +++ b/src/Commands/core/EntityCommands.php @@ -12,6 +12,7 @@ use Drupal\Core\Entity\EntityStorageException; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\Query\QueryInterface; +use Drupal\Core\Entity\RevisionLogInterface; use Drush\Attributes as CLI; use Drush\Commands\AutowireTrait; use Drush\Commands\DrushCommands; @@ -164,6 +165,9 @@ public function doSave(string $entity_type, array $ids, ?string $action): void $entity->setUnpublished(); } } + if (is_a($entity, RevisionLogInterface::class)) { + $entity->setRevisionLogMessage(dt('Re-saved by Drush entity:save. Action is !action.', ['!action' => $action ?? 'none'])); + } $entity->save(); } }