Jump to content

forumsTopicPost_delete webhook isn't getting triggered


Go to solution Solved by Marc Stridgen,

Recommended Posts

Hi,

I created 2 webhooks, one for "forumsTopicPost_create" and one for "forumsTopicPost_delete", both pointing to my script that simply logs the request.

When I reply to a topic - I can see that the "forumsTopicPost_create" webhook is indeed being triggered, with all the IPS\forums\Topic\Post object data.
However, when I delete this comment (not hide, full delete) - the "forumsTopicPost_delete" is NOT triggered.

I tested this quite a few times, and waited long enough... it's not triggering.

Any ideas?

 

Link to comment
Share on other sites

1 minute ago, Omri Amos said:

I tested this quite a few times, and waited long enough... it's not triggering.

Could you please clarify how long you waited? These webhooks do not fire immediately and are done based off of background tasks. If you run your background tasks based off of traffic on your community and there is no one viewing your community at the time, it will fire on the next time the task is ran.

Link to comment
Share on other sites

Posted (edited)

Thanks for the quick reply!
I waited about 5 minutes... the forumsTopicPost_create webhook is usually fired within a few seconds (I have a decently busy site).

I created a new test post when I started writing this message - and as I'm typing this the forumsTopicPost_create webhook got triggered - after 10-20 seconds 🙂
I have now deleted this post, and started a stopwatch... I will submit this reply in 10 minutes.

and.... 10 minutes passed - still no forumsTopicPost_delete triggered.

So to answer your questions - over 10 minutes.. while the forumsTopicPost_create webhook gets triggered within seconds.

 

Edited by Omri Amos
Link to comment
Share on other sites

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Link to comment
Share on other sites

oh, I actually had no idea "delayed deletes" is a thing!
I see now that I have a lot of deleted posts from the last month that I can recover - including all my test posts as well, obviously.

So this must be it.
(even though this should be addressed in some way.. as the post is indeed deleted as far as the user knows..)

I looked around the adminCP settings and changed "Permanently delete content" to "Immediately", and then tested the webhooks again, hoping this time it would work: but it didn't...

Now I don't see an option to recover my deleted post (note: it was a post (reply) and not an entire topic), but still no forumsTopicPost_delete webhook got trigger...

 

I updated the Admin CP Access on my account.

Link to comment
Share on other sites

10 hours ago, Omri Amos said:

Now I don't see an option to recover my deleted post (note: it was a post (reply) and not an entire topic), but still no forumsTopicPost_delete webhook got trigger...

 

Did you get any notifications in the meanwhile?

The content is still flagged for deletion and it's being deleted by a background task which runs daily. If you didn't get anything yet, I would suggest to wait for 12h before we continue to investigate this further. 

Link to comment
Share on other sites

I'm not sure why do you believe it will trigger after 12 hours, when my new-post triggered within a few seconds... this doesn't make sense and is obviously not normal even if in some miracle it will suddenly work after 12 hours... 🤷‍♂️

I disabled the delayed deletes - my deleted post is permanently deleted, but the hook didn't get triggered.
I'm not sure what else to say, I'm pretty sure there's something wrong with this specific hook 🤷‍♂️

Link to comment
Share on other sites

52 minutes ago, Omri Amos said:

I'm not sure why do you believe it will trigger after 12 hours, when my new-post triggered within a few seconds

Because of:

Quote

The content is still flagged for deletion and it's being deleted by a background task which runs daily

Even if you change the setting, the previously soft deleted content is still there and will be removed with the task.

Link to comment
Share on other sites

2 hours ago, Daniel F said:

Even if you change the setting, the previously soft deleted content is still there and will be removed with the task.

yeah, all the old tests.. but I did new tests after I changed the settings..

 

1 hour ago, Daniel F said:

apologies, I just tested it local and was able to reproduce what you're seeing. We're going to fix this for an upcoming release.

Great! 
Thank you

Link to comment
Share on other sites

  • 4 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...