Cms: Multi-site: Unable to have empty desynced Replicator field

Created on 4 Sep 2020  Â·  3Comments  Â·  Source: statamic/cms

Bug Description

There's no way to desync a Replicator field from the origin and delete all sets. When you desync the Replicator field and delete all sets, the field will be back to synced after reload.

How to Reproduce

  1. Have a multi-site installation
  2. Create a blueprint with a Replicator and a set
  3. Populate the content with some Replicator sets
  4. Switch to another locale and desync the Replicator
  5. Delete all Replicator sets and reload
  6. The Replicator field will be back to synced

Extra Detail

The only way to have a desynced and empty Replicator field is to add an empty key to the content file.

Origin:

---
replicator:
  -
    color: Blue
    type: color
---

Other locale:

---
replicator:
---

Environment

Statamic 3.0.3 Pro
Laravel 7.27.0
PHP 7.4.9
aerni/snipcart dev-master

multisite

Most helpful comment

Still an issue.

All 3 comments

Not limited to replicator. You cannot set a localized field to "nothing" (like an empty replicator, empty text field, etc) at the moment because Statamic strips out empty values. On the next load, it sees no value so it falls back.

We need to avoid stripping out the null values if you explicitly nulled them out. Fun!

This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.

Still an issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philippgrimm picture philippgrimm  Â·  3Comments

andrewying picture andrewying  Â·  4Comments

aerni picture aerni  Â·  3Comments

billmn picture billmn  Â·  4Comments

filipac picture filipac  Â·  4Comments