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.84k stars 479 forks source link

Workflow Module with Action "Move to mailbox" is not working #4123

Closed mahavirn closed 3 weeks ago

mahavirn commented 1 month ago

Hi @freescout-help

"Workflow Module" with Action "Move to mailbox" is not working, after doing it, it gives "Too Many Redirects" error.

Screenshot 2024-07-13 at 10 46 07 PM
mahavirn commented 1 month ago

When we run this Workflow manually on any ticket, than that ticket goes into "Too Many Redirects" loop....

freescout-help commented 1 month ago

Are you using any non-official modules? If so try to disable them.

Also check errors in Manage > Logs > App Logs.

mahavirn commented 1 month ago

No, not using any of them, all bought from the FreeScout Marketplace.

mahavirn commented 1 month ago

There is no error related to this in ErrorLog.

freescout-help commented 1 month ago

We can't reproduce the issue. The only way to figure out what is the reason is to debug it on your server.

mahavirn commented 1 month ago

Are there any specific steps to debug on server?

freescout-help commented 1 month ago

In your case you can try first to figure out what causes the infinite redirect: https://github.com/freescout-help-desk/freescout/blob/dist/app/Http/Controllers/ConversationsController.php#L75

https://github.com/freescout-help-desk/freescout/wiki/Debugging

mahavirn commented 1 month ago

Another strange thing is its working for some users and for some not.

After debugging found that the folder_id is not updating in the database.

mahavirn commented 1 month ago

Hi @freescout-help

Its updating the Mailbox id properly but unable to update Folder Id..

Its assigning previous (original) mailbox's "Assigned" folder to "Folder Id"

freescout-help commented 1 month ago

We still can't reproduce the issue. Try to figure out why it's not changing the folder_id: https://github.com/freescout-help-desk/freescout/blob/dist/app/Conversation.php#L1285

mahavirn commented 1 month ago

Hi @freescout-help

I have check there and its updating $this->folder_id but again folder_id is reset back to some other id (Assigned folder of previous mailbox)

We also have multiple other Workflows, can it be because of that?

freescout-help commented 1 month ago

Yes, try to disable other workflows.