Skip to content
Snippets Groups Projects

Issue #3088790 by bahuma20, zolt_toth: Inconsistent database because of a bug...

2 files
+ 25
8
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -11,6 +11,7 @@
use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\TranslatableInterface;
use Drupal\Core\Form\FormBuilderInterface;
use Drupal\content_moderation\Form\EntityModerationForm;
use Drupal\Core\Routing\RouteBuilderInterface;
@@ -119,6 +120,10 @@ public function entityPresave(EntityInterface $entity) {
|| $current_state->isDefaultRevisionState()
|| !$this->moderationInfo->isDefaultRevisionPublished($entity);
if ($entity instanceof TranslatableInterface) {
$update_default_revision = $update_default_revision || $entity->isNewTranslation();
}
// Fire per-entity-type logic for handling the save process.
$this->entityTypeManager
->getHandler($entity->getEntityTypeId(), 'moderation')
Loading