Webhook "Triggered Categories" lost after reorganizing categories

AI-generated summary

DanielMarquard reported a bug where the “Triggered Categories” field in a webhook configuration became empty after reorganizing category hierarchies. The issue appeared to be intermittent, as refreshing the page restored the data DanielMarquard. codinghorror assigned the investigation to tgxworld, who initially could not reproduce the specific reordering bug but identified and fixed a related issue where categories added during webhook creation were not being saved. tgxworld requested exact reproduction steps, to which DanielMarquard provided screenshots showing the empty field before a refresh and populated after. tgxworld suggested upgrading to include the recent fix. DanielMarquard confirmed that applying the fix resolved the issue, and tgxworld closed the topic.

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 me gusta

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 Me gusta

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 Me gusta

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 Me gusta

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 me gusta

Sure, I’ll do that now.

1 me gusta

@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 Me gusta

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

1 me gusta