Error when trying to resend a reply email [SOLVED]

Forum dedicated to Mods for HESK created by Mike Koch

Moderator: mkoch227

Post Reply
nacesprin
Posts: 2
Joined: Wed Sep 04, 2019 12:30 am

Error when trying to resend a reply email [SOLVED]

Post by nacesprin »

Script URL: https://example.com/api/index.php/v1-internal/staff/tickets/3/resend-email?replyId=1

Mods for HESK version: 2019.1.0

HESK version: 2.8.4

Hosting company: Linode VPS

What terms did you try when SEARCHING for a solution:

Code: Select all

The endpoint '\/api\/index.php\/v1-internal\/staff\/tickets\/3\/resend-email?replyId=1' was not found. Double-check your request and submit again
Write your message below:
I am using Nginx and setup with https://mods-for-hesk.readme.io/docs/nginx-troubleshooting
So.., debugging ajax callings when I want to resend the email such:

Code: Select all

https://example.com/api/index.php/v1-internal/staff/tickets/3/resend-email
is working well, but

Code: Select all

https://example.com/api/index.php/v1-internal/staff/tickets/3/resend-email?replyId=1
which is used to resend and Reply ID is not working and throws error:

Code: Select all

The endpoint '\/api\/index.php\/v1-internal\/staff\/tickets\/3\/resend-email?replyId=1' was not found. Double-check your request and submit again
How can I achieve to setup the system in order to use ?replyId=XX parameter in ajax callings?
Last edited by nacesprin on Wed Sep 11, 2019 11:54 pm, edited 1 time in total.
nacesprin
Posts: 2
Joined: Wed Sep 04, 2019 12:30 am

Re: Error when trying to resend a reply email [SOLVED]

Post by nacesprin »

I solved it:

In

Code: Select all

hesk/api/Link.php:public static function all( $routes )
change

Code: Select all

if( preg_match( '#^/?' . $routePath . '/?$#', $path, $matches ) ){
for

Code: Select all

if( preg_match( '#^/?' . $routePath . '/?#', $path, $matches ) ){
But I don't know why is $ written in the original regexp
Post Reply