Skip to content

Commit

Permalink
Respect non-translatable fields in multisite events
Browse files Browse the repository at this point in the history
  • Loading branch information
seandelaney committed Jun 28, 2022
1 parent 1f0c607 commit f79b13f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/plugin/src/Services/EventsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,13 @@ private function _respectNonTranslatableFields(Event $event, bool $isSaved) {
$otherSiteIds = ArrayHelper::withoutValue(array_keys($supportedSites), $event->siteId);

if (! empty($otherSiteIds)) {
$otherSiteEvents = Event::find()->id($event->id)->siteId($otherSiteIds)->status(null)->all();
foreach ($otherSiteIds as $otherSiteId) {
$otherSiteEvent = $this->getEventById($event->id, $otherSiteId);

if ($otherSiteEvent) {
$otherSiteEvents[] = $otherSiteEvent;
}
}
}

foreach ($event->getFieldLayout()->getTabs() as $fieldLayoutTab) {
Expand Down

0 comments on commit f79b13f

Please sign in to comment.