Malformed URL links in triggered mails

Infos:

  • Used Zammad version: 2.4.X
  • Used Zammad installation source: centos7 package
  • Operating system: CentOS 7.4
  • Browser + version: Chrome 66

Expected behavior:

  • #{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id} should point to the ticket.

Actual behavior:

We’re created a trigger which sends a mail in case the ticket gets closed. The mail contains a link to the zammad webgui in order to review, re-open, etc. the link is displayed properly in the mail, but the href is wrong. Here are the details:
#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id} displays the proper link but points to:
#{config.http_type}://#{config.fqdn}/#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}

As an example: https://support.domain.com/#ticket/zoom/123 points to **https://support.domain.com/**https://support.domain.com/#ticket/zoom/123

Any idea how to fix this?
Thanks

I analyzed app/views/mailer/ticket_update/en.html.erb and found:

<div>
  <a href="#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}" target="zammad_app">#{t('View this in Zammad')}</a>
</div>

This is exactly what I have in my trigger. When replacing the href part with my own content it started working. Only thing I recognized was that the variables did not become blue color and remained black.

image
vs.

image

We had a similar issue with a german mail service from O2. They do some crazy stuff with the links and replace the “#” with the url.

We checked the mail (the actual mail sent from Zammad) and everything is ok there.
can you check the plain mail content to please

regards

Hey Hannes,
thanks für your swift reply.
The source of the malformed link was (replaced our domain with “domain”):

<p style="margin: 0;">
<a href="http://tickets.domain.com/https://tickets.domain.com/#ticket/zoom/174" rel="nofollow noreferrer noopener" target="_blank" title="http://tickets.domain.com/https://tickets.domain.com/#ticket/zoom/174">
<br></a></p>
</body>
</html>

When looking in more detail I saw an http and an https reference. And indeed the only change we did in the last 2 weeks was moving from http to https on nginx and adopting config.http_type to the new value.
It might be some caching or left over from the old config?
Thanks much

@MrMontesa , Can you post a screenshot about https://tickets.domain.com/#channels/email -> Signature?

In the first case there is a link in your template around ticket.id (I guess it’s added by your browser automatically).

Can you create an issue at GitHub for that? We can find a solution for that to strip out this kind of auto generated links by the browser.

Hey @never,
We do have a single signature configured here where text field consists of the following:

#{user.firstname} #{user.lastname}

--
Some Company details here
--

The note field of the signature is empty.
This signature was NOT added when the trigger took action and mail was sent.

@martini
I filed github issue #2019
Out of curiosity, with browser I guess you mean the mail browser right? In my case Outlook 2016 displaying the HTML email.

Thanks for your help guys.

@MrMontesa , :ok_hand: thank you for make me understood.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.