Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Omri Amos Posted March 8, 2022 Posted March 8, 2022 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?
Jim M Posted March 8, 2022 Posted March 8, 2022 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.
Omri Amos Posted March 8, 2022 Author Posted March 8, 2022 (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 March 8, 2022 by Omri Amos
Jim M Posted March 8, 2022 Posted March 8, 2022 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.
Daniel F Posted March 8, 2022 Posted March 8, 2022 Was the topic really deleted or are you using delayed deletes
Omri Amos Posted March 8, 2022 Author Posted March 8, 2022 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.
Daniel F Posted March 9, 2022 Posted March 9, 2022 I have raised an internal suggestion to probably add an additional payload like "soft-deleted/permanently_deleted"to the delete hook and to fire it in both cases.
Daniel F Posted March 9, 2022 Posted March 9, 2022 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.
Omri Amos Posted March 9, 2022 Author Posted March 9, 2022 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 🤷♂️
Daniel F Posted March 9, 2022 Posted March 9, 2022 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.
Daniel F Posted March 9, 2022 Posted March 9, 2022 Hi, 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. Omri Amos and Jim M 2
Omri Amos Posted March 9, 2022 Author Posted March 9, 2022 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
Solution Marc Posted April 5, 2022 Solution Posted April 5, 2022 This issue has been resolved in 4.6.12, which has just been release. Please let us know if you still have any issues once you have upgraded to that release. SeNioR- 1
Recommended Posts