Segment don't want to be updated/deleted

Expected behavior

I’ve got a segment configured through collection settings on Forest (not through my file) and each time I want to delete or update it, it fails.

Actual behavior

I mean, it says it’s deleted/updated in the green popup, but when I refresh the page, it’s still there.

Failure Logs

No error in the console.


I have to say, if I create other segments in this specific collection, I can update or delete them without any problem.

“express”: “~4.16.3”,
“forest-express-mongoose”: “^6.3.5”,

Hi @XavierColombel,

Could you share a screenshot of yor segment configuration settings?

Also a screenshare of your issue could help (with loom for example)

Of course, there it is :


I’ve been digging on our end what could be wrong with your segments and is seems that the Avoirs segment exist 98 times in your layout (that might explain why it cannot be deleted).

If you want it I could try to manually remove those 98 occurrences of the Avoirs segment.

However I’m wondering how this happen in a first place. Do you recall when you first created this segment?

LMAO @lamatt_v

Ok, please remove all 98 occurrences of Avoirs.

I think I know how it might have happen. Actually, at first I remember I created an Avoirs segment through Forest settings then, without removing it, I’ve created several others segments using the JSON file (containing an Avoirs segment :face_with_hand_over_mouth:). After, I think it began to f*cked up.

1 Like

It might come from that. I’ll keep an eye on similar cases in the future, thank you for pointing that out.

However, I might have been to quick on telling that I’ll remove the Avoirs segment on my end. There might be chances of corrupting your layout. The safest way to do it would be for you to drop the Avoirs segment 97 times.

I do understand that it might be painful to do so but I wouldn’t risk to corrupt your layout by rawly dropping a part of it.

But first we must be sure that dropping it on your end really removes it. Could you try to drop it 5/10 times so I can see if the number or Avoirs segments drops on my end? :pray:

Ok I just did it several times. Do you see a difference @lamatt_v?

It seems to work,

I still reference 49 occurrences of the segment. By dropping it that amount of times you should be back to normal.

Thank you for your time and sorry for the inconvenience. :pray:

@lamatt_v Now I’ve got an error “Segment deletion failed.” :frowning:

And I still have the Avoirs segment…

You only have one Avoirs left, let’s debug this out.

What does the error message states exactly?

Capture d’écran 2020-11-17 à 18.02.53

Could you take a look and share with me the details of the request response that triggers this toastr?

Capture d’écran 2020-11-17 à 18.08.25

@XavierColombel the issue seems to come from the collections settings. The collection’s display is restricted to segments only, thus preventing you from dropping all of those.

You have to disable this toggle first to drop the last segment.

Screenshot 2020-11-17 at 18.40.35

Yeeeepeeee :cowboy_hat_face: Thank you @lamatt_v it’s finally working!

1 Like