# Webhook "Triggered Categories" lost after reorganizing categories

**URL:** https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272
**Category:** Bug
**Created:** [January 6, 2017, 9:23am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272 "2017-01-06T09:23:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 6, 2017, 9:23am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/1 "2017-01-06T09:23:45Z")

</div>

I set up a new webhook tonight with the “Triggered Categories” field populated. Later on, I created two new categories, one of which I set as the parent of the other new one and two existing categories, then reordered them.

Something must have went wrong when I did this because when I edited the webhook to add a new category to the “Triggered Categories” field, the field was empty. I’ve re-added all the categories to this filter and will leave the categories as they are for now because I can’t risk this webhook being triggered on private message or private category post events.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 6, 2017, 6:44pm UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/2 "2017-01-06T18:44:54Z")

</div>

Sure @tgxworld can you have a look?

---

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 6, 2017, 10:02pm UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/3 "2017-01-06T22:02:52Z")

</div>

Update on this. I went to edit the webhook earlier today and noticed that the categories disappeared again after changing nothing, so I refreshed the page and then they were there in the field. FYI.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [January 9, 2017, 3:30am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/4 "2017-01-09T03:30:35Z")

</div>

Hmm I had a look at the code path again and I can’t reproduce the bug being reported here.

I did find a bug where categories added during creation are not actually being saved at all and fixed it in

[https://github.com/discourse/discourse/commit/c260a4e34d8df1a6f8263ca0d3b5c3a6a8a8bb29](https://github.com/discourse/discourse/commit/c260a4e34d8df1a6f8263ca0d3b5c3a6a8a8bb29)

@DanielMarquard Can you try providing me with the exact reproduction steps so that I can dig more into it? Thank you!

---

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 9, 2017, 3:35am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/5 "2017-01-09T03:35:05Z")

</div>

> [@tgxworld](#):
>
> @DanielMarquard Can you try providing me with the exact reproduction steps so that I can dig more into it? Thank you!

Sure. When I click the pencil icon to the right of the webhook to edit it, everything looks good with the exception of the “Triggered Categories” field being empty.

 ![](https://global.discourse-cdn.com/meta/original/3X/c/5/c5c4fa5a7aefc95bd2a0b2856e2ccfa12f1b2783.png)

When I hit F5 to refresh, the field appears to be populated.

 ![](https://global.discourse-cdn.com/meta/original/3X/9/0/90d3e67669a6be6351f253c1452b0aece7252729.png)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [January 9, 2017, 3:37am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/6 "2017-01-09T03:37:17Z")

</div>

Hmmm can you try upgrading to include my latest fix to see if this has been resolved first before I dig into this further?

---

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 9, 2017, 3:38am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/7 "2017-01-09T03:38:50Z")

</div>

> [@tgxworld](#):
>
> Hmmm can you try upgrading to include my latest fix to see if this has been resolved first before I dig into this further?

Sure, I’ll do that now.

---

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [January 9, 2017, 3:52am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/8 "2017-01-09T03:52:34Z")

</div>

@tgxworld, it seems to be working after applying your fix. I can check again tomorrow as well just to be sure. I’ll let you know.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [January 9, 2017, 5:23am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/9 "2017-01-09T05:23:28Z")

</div>

Closing this first. Feel free to flag the topic if you run into this again. Thanks for reporting 🙂

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [January 9, 2017, 5:23am UTC](https://meta.discourse.org/t/webhook-triggered-categories-lost-after-reorganizing-categories/55272/10 "2017-01-09T05:23:30Z")

</div>


