Skip to content
Snippets Groups Projects

Issue #2977362: Revision user incorrectly appears as anonymous user when node author is cancelled

Open Issue #2977362: Revision user incorrectly appears as anonymous user when node author is cancelled
Compare and
8 files
+ 517
10
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -763,7 +763,8 @@ protected function doPreSave(EntityInterface $entity) {
@@ -763,7 +763,8 @@ protected function doPreSave(EntityInterface $entity) {
$no_longer_default = !$entity->isDefaultRevision();
$no_longer_default = !$entity->isDefaultRevision();
$original_same_as_current = $entity->getOriginal()?->getRevisionId() == $entity->getLoadedRevisionId();
$original_same_as_current = $entity->getOriginal()?->getRevisionId() == $entity->getLoadedRevisionId();
$not_new_revision = !$entity->isNewRevision();
$not_new_revision = !$entity->isNewRevision();
if ($previously_default_revision && $no_longer_default && $original_same_as_current && $not_new_revision) {
$is_syncing = $entity->isSyncing();
 
if (!$is_syncing && $previously_default_revision && $no_longer_default && $original_same_as_current && $not_new_revision) {
throw new EntityStorageException("An existing default revision of the '{$this->entityTypeId}' entity type can not be changed to a non-default revision.");
throw new EntityStorageException("An existing default revision of the '{$this->entityTypeId}' entity type can not be changed to a non-default revision.");
}
}
Loading