Webhook "Triggered Categories" lost after reorganizing categories

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.

Sure @tgxworld can you have a look?

1 Like

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.

3 Likes

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

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

4 Likes

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.

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

2 Likes

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

1 Like

Sure, I’ll do that now.

1 Like

@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.

3 Likes

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

1 Like