Support

Akeeba Ticket System

#22851 Reply Emails - broken 'View' link

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 nicholas on Thursday, 25 June 2015 01:21 CDT

rivermedia
Greetings Guys! And thanks in advance for the awesome support you always provide!

I have this issue on 2 sites running the same version of Joomla! & ATS
The link in the 'Response' email 'View and reply on JoomLadds' is getting created with two instances of the domain: http://domain.com/http://domain.com/index.php?option=com_ats&view=ticket&id=xx#pxxx

The initial email for 'New' tickets is correct.

Please let me know if you need site access.

nicholas
Akeeba Staff
Manager
Can you please check your email template? Maybe you have added the domain name manually? I am suspecting that because the code which produces the link to the ticket is actually the same in all instances. In fact, there's just one piece of code parsing all the email templates for all possible emails sent out when a ticket is created, replied to, assigned or closed. The only variables it accepts is the name of the email template and the ticket object itself. If one email is correct and the other is not then the only reasonable culprit can be the email template.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

rivermedia
Thanks for the quick response.
I can tell you with 100% confidence that I have not modified any of the email templates (on either site). And I just checked them too to be sure.
This line of code is consistent in each of the private ticket responses:
<p><a href="https://www.akeeba.com/[URL]" style="font-weight: bold;">View and reply on [SITENAME]</a></p>


Where does the [URL] value get changed?

EDIT: Just to be clear, the additional "/" before [URL] was added by the form. I checked to make sure that this did not exist in the templates.

rivermedia
Ok, so now this is weird.
All I did was check the templates (without making any changes) and now the link is correct. At least on one of the sites.

With the links now working a site, it brings up another issue that is 2 folded:
  1. With a post from the back-end, the link is NOT using SEF, while posts from the front-end are using SEF. The problem is, with back-end created links (not SEF), after I log in, I am directed to the home page, not the ticket. While SEF versions of the same link, work as expected.

  1. We are using ssl on the back-end of a site and not on the front-end (at least not every page)
    If I post to a ticket on the back-end - using ssl, the link for the user in the email has https:// - I would imagine a setting similar to the global params, asking if the link should use SSL or not (although this is not a major issue, I thought I'd bring it to your attention)


Again, your help is appreciated!

rivermedia
Ok, never mind on the first issue I mentioned:
With a post from the back-end, the link is NOT using SEF, while posts from the front-end are using SEF. The problem is, with back-end created links (not SEF), after I log in, I am directed to the home page, not the ticket. While SEF versions of the same link, work as expected.

As I suspected after posting my issue, this was due to a 3rd party extension we had installed.

nicholas
Akeeba Staff
Manager
With a post from the back-end, the link is NOT using SEF


All URLs are passed through Joomla!'s JRoute::_() routing API. For reasons that have to do with how Joomla! works SEF URLs are only generated in the front-end. The back-end can not and will not generate SEF URLs. There's no workaround to that (unless we rewrite Joomla! from top to bottom).

The problem is, with back-end created links (not SEF), after I log in, I am directed to the home page, not the ticket. While SEF versions of the same link, work as expected.


Yes, definitely a 3PD extension. The definitive URL for anything running inside Joomla! is the non-SEF one. I would understand it if the SEF URL didn't work but the non-SEF one did. After all Joomla! translates the SEF URL to a non-SEF one to show you the pages. So what happened screamed "some 3PD extensions is killing my site" ;)

We are using ssl on the back-end of a site and not on the front-end (at least not every page)

If I post to a ticket on the back-end - using ssl, the link for the user in the email has https:// - I would imagine a setting similar to the global params, asking if the link should use SSL or not (although this is not a major issue, I thought I'd bring it to your attention)


I have intentionally NOT added and will NOT add such a parameter. If you've gotten to the trouble of implementing SSL then implement it throughout your site (front-end and back-end). Otherwise your site is just as good as not enabling SSL at all for these reasons:
  • Front-end login. If you login to the front-end with the credentials of a user with back-end access consider your back-end compromised. A man in the middle attack can easily trick you into running Javascript to steal your login information even though you might be accessing the login page via SSL (all other pages on the site are not SSL, therefore as easily modifiable en route as the writing on a postcard)
  • Cookie HTTPS flag. Without explicit SSL throughout you get a cookie which is valid for both the plain HTTP and encrypted HTTPS version of your site. Stealing that cookie is trivial for anyone on the same network as you. If you have ever used any of your devices on public WiFi or allow guest connections on any network you've used you are vulnerable to this attack.
  • With HTTPS throughout you can enable HSTS. With HSTS it's perfectly sure that your browser will never, ever try to contact your site over HTTP. This mitigates a whole lot of potential security issues. Without it it's possible for you to see an HTTPS URL in the browser's address bar which has nevertheless come as a redirection from accessing an HTTP URL, usually without noticing. That first request to HTTP before you get redirected back to HTTPS can reveal a whole lot of information, including your login cookie under certain conditions.


Since we are a web site security company first and foremost we cannot possibly implement a feature which is telling our clients to actively degrade their security. I understand why you'd want it, but it's for all the wrong reasons. Think of it as a car's e-brake not engaging at speeds over 6 MPH (at least my car has this feature): it's designed to protect you from yourself.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

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!