Skip to content

Commit

Permalink
Merge pull request #215 from LulububuApps/bugfix-173-retry
Browse files Browse the repository at this point in the history
Fixed a bug where the translation data was not saved if the slug did not match the generated slug
  • Loading branch information
bobdenotter committed May 8, 2021
2 parents e37adf4 + 597d9b0 commit bc2c16e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/EventListener/StorageListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public function preSave(StorageEvent $event)
return;
}

$contentType = $this->boltConfig->get('contenttypes/' . $event->getContentType());
$subject = $event->getSubject();
$contentType = $this->boltConfig->get('contenttypes/' . $subject->getContentType());

if ($contentType === null) {
return;
Expand Down Expand Up @@ -214,7 +215,7 @@ public function preSave(StorageEvent $event)
if ($values['id']) {
/** @var Content $defaultContent */
$defaultContent = $this->query->getContent(
$event->getContentType(),
$subject->getContentType(),
['id' => $values['id'], 'returnsingle' => true]
);
}
Expand Down

0 comments on commit bc2c16e

Please sign in to comment.