Support

Akeeba Ticket System

#32097 Invalid URL used when setting ticket status, missing

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by on Thursday, 09 January 2020 17:17 CST

weeblr
Hi

When a support staff tries to set a ticket status using the top right corner drop down - in front end, this does not work as the javascript is not using the correct URL. The prefix ATS_ROOT_URL is missing in that case, while it's correctly used in all othrt javascript instance use of $.ajax I found.

I found 3 instances of this:

media/com_ats/js/adm_tickets.js: looks like admin, should work fine

media/com_ats/js/ticket.js, at line 61 and 70, those are the breaking ones.

Best regards

weeblr
Hi again


let me correct that: the file list is wrong, it should be

media/com_ats/js/ticket.js, at line 70
media/com_ats/js/tickets.js at line 61

Note that in ticket.js, I also suspect the other ajax call (to assign the ticket) is also probably missing the root url)

Fixing those lines with

 $.ajax( ATS_ROOT_URL + 'index.php?option=com_ats&view=Tickets&task=ajax_set_status&format=json&'+$('#token').attr('name')+'=1',{

instead of
 $.ajax( 'index.php?option=com_ats&view=Tickets&task=ajax_set_status&format=json&'+$('#token').attr('name')+'=1',{


Fixes the problem.

Best regards

weeblr
Hi again

Found another instance in media/com_ats/js/timecards.js

Best regards

tampe125
Akeeba Staff
Hello,

can you please give more details about this issue?
I ran some tests, but I wasn't able to replicate it locally. In which page does it happen? In Admin Tools you can change those values in several different places (Tickets list, single ticket, Latest opened tickets etc etc).

By the way, do you have SEF URLs enabled in your site? If so, are you using the .htaccess rewrite rules or not?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

weeblr
Hi Davide,

Yes, this is with SEF and .htaccess (and sh404SEF).

As you are using a relative URL, the ajax request is posting its data to, for instance,

https://example.com/helpdesk/latest/index.php?option=com_ats&.....

instead of

https://example.com/index.php?option=com_ats&.....

Relative URLs are ok in the backend but on front end they'll cause this kind of issue. ATS does use a properl absolute URL in all instances (and has the ATS_ROOT_URL defined for that) but not in the 3 instances I identified where this was overlooked.

Best regards

weeblr
Hi

I realize now that this may not occur if you are with Apache and AcceptPathInfo is enabled, maybe that's the reason?

Best regards

tampe125
Akeeba Staff
Thank you very much for the report, there was a bug indeed.
Can you please download the latest dev release and try again?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

weeblr
Hi Davide,

Thanks, that fixes this particular problem!

Actually, as I installed this dev package, I noticed something a bit peculiar: you do include an sh404SEF plugin for ATS, which I appreciate. When installing the ATS package, the sh404SEF plugin is correctly installed in the /plugins/sh404sefextplugins folder however another copy of the plugin is also found in the /plugins/com/ats folder!

I deleted that folder and installed again the package to be sure but yes, it does that.

Best regards

tampe125
Akeeba Staff
Thank you very much for the report.
Yes, it's strange, the plugin ends up in that folder, too.

I'll investigate on this, in the meantime you can safely ignore this, since it's harmless (even if annoying)

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!