Mautic replaces ? with & in URL

Hi Guys,



after sending the email out where I have something like this (generated email in Code Mode):

Code:

Mautic replaces the question mark, so I end up with this
Code:

And it breaks my URL since it is strongly parameter-dependent.

Any idea how to solve it?

Thanks,
D.

Hi Guys,

after sending the email out where I have something like this (generated email in Code Mode):

<img src="https://myurl/?param1=A&param2=B" />

Mautic replaces the question mark, so I end up with this

<img src="https://myurl/&param1=A&param2=B" />

And it breaks my URL since it is strongly parameter-dependent.

Any idea how to solve it?

Thanks,
D.

Temporarily solved it by modifying:

Configuration - Email Settings - Disable Trackable URLs (setting it to Yes, thus disabling tracking)

D.

Yes, but now your URLs are not getting tracked any more.

Yes, I know. This is why I said “temporarily”, meaning that I’ll be keeping this setting for this campaign’s lifetime only, and then I’ll switch it back on.

Thanks.

D.

I once hat a similar problem. Something in the URL went wrong and the first parameter could not be accessed on the landing page. My simple workaround was adding a dummy parameter in the first position and the “real” parameters after that. Like:

http://mysite.com/?dummy=dummy&email=temp@example.com

The first parameter is still broken, but all parameters after could be accessed. Not elegant, but it works.

I am not sure this would work in my case. If you take a look at the first post, the first parameter gets an ampersand (&) instead of the question mark (?).

I think that all URL parameter grabbers on webservers require a ? at the beginning in order to parse the query (GET) parameters.

Well, since I am calling a service I programmed myself, I could easily rewrite the code to expect something as #/param1/val1/param2/val2/ but this sucks, to be honest :wink:

Of course I read your 1st post. :slight_smile: I used it to fill out forms on a Mautic landing page. Which worked with the workaround. I don’t know if it helps in your case but I would give it a try.

Yeah, probably the code behind Mautic landing pages works as you wrote (probably Symfony handles query parameters somewhat better than vanilla PHP), whileas my service (which is PHP-based and expects $_GET["…"]) does not. Thanks, though.