<p>Perhaps you mean propagation, can you try this in your custom plugin/module?</p>
<pre><code>Event::on(
    Elements::class,
    Elements::EVENT_AFTER_SAVE_ELEMENT,
    static function (ElementEvent $e): void {
        // Skip propagating entries/elements
        if ($e-&gt;element-&gt;propagating) {
            return;
        }
    }
);
</code></pre>
<p>In fact, you can use this in any other event where the element is propagated</p>

CC BY-SA 4.0
2022-09-06T20:46:56.770Z
2022-09-06T20:46:56.770Z
RomanAvr
<p>My setup:</p>
<p>Craft 3 installation with a multi-site setup. 3 languages, all enabled.</p>
<p>I have a custom plugin with a custom element type, FooBar that extends the Element class and a custom FooBar field type allowing me to link to an FooBar entry.</p>
<p>I've created 3 FooBar entries, one in each site. If I edit one of the FooBar entries, only that entries title updates. That all works fine.</p>
<p>I have a Single with a relation field linked to the FooBar field, with one of the FooBar entries selected.</p>
<p>All pretty standard relation setup.</p>
<p>If I edit the Single but click on the Foobar entry title, the slideout panel opens allowing me to edit FooBar entry...That's fine. Expected functionality...</p>
<p>When I click save in the slideout panel, the FooBar entry is saved, again as expected but the title value is also updated across all 3 sites. From what I can gather, its because propagation is happening.</p>
<p>How do I update the FooBar entry in the current site only, stopping propagation (basically not updating across all 3 sites) ?</p>
<p>Saving an element within a slideout panel is core Craft functionality, My beforeSave event listener on FooBar element is not firing.</p>
<p>So is there another event, or something that I've missed where I can prevent the FooBar entry from being updated across all 3 site.</p>

<localization><multi-site><custom-fieldtype><element>
Craft 3, Multi site setup - Update title for entry 1 site only
# Craft 3, Multi site setup - Update title for entry 1 site only

(Asked by: username_0 on 2022-09-06)

My setup:

Craft 3 installation with a multi-site setup. 3 languages, all enabled.

I have a custom plugin with a custom element type, FooBar that extends the Element class and a custom FooBar field type allowing me to link to an FooBar entry.

I've created 3 FooBar entries, one in each site. If I edit one of the FooBar entries, only that entries title updates. That all works fine.

I have a Single with a relation field linked to the FooBar field, with one of the FooBar entries selected.

All pretty standard relation setup.

If I edit the Single but click on the Foobar entry title, the slideout panel opens allowing me to edit FooBar entry...That's fine. Expected functionality...

When I click save in the slideout panel, the FooBar entry is saved, again as expected but the title value is also updated across all 3 sites. From what I can gather, its because propagation is happening.

How do I update the FooBar entry in the current site only, stopping propagation (basically not updating across all 3 sites) ?

Saving an element within a slideout panel is core Craft functionality, My beforeSave event listener on FooBar element is not firing.

So is there another event, or something that I've missed where I can prevent the FooBar entry from being updated across all 3 site.

**Tags:** localization, multi-site, custom-fieldtype, element

---

## 1 answers

### Answer by username_1 on 2022-09-06. Score: 0 | Accepted answer

Perhaps you mean propagation, can you try this in your custom plugin/module?
Event::on(
    Elements::class,
    Elements::EVENT_AFTER_SAVE_ELEMENT,
    static function (ElementEvent $e): void {
        // Skip propagating entries/elements
        if ($e->element->propagating) {
            return;
        }
    }
);

In fact, you can use this in any other event where the element is propagated


---

