freescout-help-desk / freescout

FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
https://freescout.net
GNU Affero General Public License v3.0
2.95k stars 488 forks source link

Workflow Module: Trigger Webhook action does not work #4025

Closed ilyakonovalenko closed 4 months ago

ilyakonovalenko commented 4 months ago

Hello,

According to the documentation:

Trigger Webhook — trigger a custom Webhook (requires API & Webhooks Module). In the action setting enter your custom Webhook event name (example: custom.webhook.event) and after that use this event in the API & Webhooks section to create a Webhook.

However, when you set anything in the workflow settings, it does not save.

For example, this is how workflow is configured: image

This is what after I save workflow (empty field): image

freescout-helpdesk commented 4 months ago

We can't reproduce the issue. Try to disable all non-official modules and customizations. Also try to re-update the FreeScout.

And if you are using CloudFlare or some other proxies - try to check their config or disable them.

ilyakonovalenko commented 4 months ago

Tested with all modules disabled except WorkFlows and API modules. No, it does not save a value of action. From what I can see, the action comes from API module.

Are you able to save action value?

ilyakonovalenko commented 4 months ago

It seems I found what is wrong.

Input has name actions[2][0][value] and we have another input with the same name close to that input. So it seems FreeScout grabs second input's value which is empty.

image

freescout-helpdesk commented 4 months ago

So it seems FreeScout grabs second input's value which is empty.

Not FreeScout. This is how browsers send forms they send the last input.

Can you send full screenshot. Where does that second input come from?

freescout-helpdesk commented 4 months ago

2024-05-15_16-26-01

ilyakonovalenko commented 4 months ago

I don't know. It gets added to the action only.

image

freescout-helpdesk commented 4 months ago

Try to debug line 390 in /Modules/CustomFields/Providers/CustomFieldsServiceProvider.php

Or recreate this workflow and see if the issue persists.

ilyakonovalenko commented 4 months ago

It seems I found the issue. It was caused by custom module. Sorry for that.