You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing entity deletion in the browser, webhooks are not sent for some operations.
Specifically, revision_delete, user_delete, api_token_delete, and webhook_delete.
When these operations are performed with webhooks set for the operations, HTTP status 404 seems to be returned.
If no webhook is set, the response is normal.
Steps to Reproduce
Add a Webhook.
It does not seem to matter whether the endpoint address is valid or invalid.
Turn on 'All system events'.
Perform operations corresponding to the problematic webhook events described above.
This may not be necessary, but I have done some research and will describe it.
I think the problem may be in the DispatchWebhookJob dispatch.
Does the deleted $detail cause problems with serialization when queuing?
In the case of page revisions, it would appear that simply changing the order of the following would work. (at least on the surface.)
(PageRevisionController.php)
Due to queue serialization.
Added a test to check a couple of delete events.
Added ApiTokenFactory to support.
Also made a couple of typing/doc updates while there.
Related to #4373
Thanks for reporting @toras9000, Can confirm, did indeed seem due to Laravel's smart serialiszation and handling of models when in the queue, where it'd attempt to re-fetch models from the database on queue job run.
I've instead changed how the job is handled, so now the webhook data is formatted on job creation, and that data is stored with the queue job instead of the model itself.
I've always put the activity logs after the actual delete action, just to ensure that activities are not logged in the event the deletion fails, so I didn't want to switch that up.
Patch in a831501, to be part of the next patch release.
Describe the Bug
When performing entity deletion in the browser, webhooks are not sent for some operations.
Specifically,
revision_delete
,user_delete
,api_token_delete
, andwebhook_delete
.When these operations are performed with webhooks set for the operations, HTTP status 404 seems to be returned.
If no webhook is set, the response is normal.
Steps to Reproduce
Expected Behaviour
Webhook is sent.
Screenshots or Additional Context
No response
Browser Details
No response
Exact BookStack Version
v23.06.1
PHP Version
No response
Hosting Environment
Docker image, lscr.io/linuxserver/bookstack:version-v23.06.1
The text was updated successfully, but these errors were encountered: