wordpress plugin cutting off base URL

I have installed the wordpress plugin on v 1.0 from wordpress repository to my wp site running wp v.4.3.1 . I configure the plugin to target my main mautic installation but when I view the page source of a page it shows the full tracking url with the very last character cut off (in my case a “t” from a “.net” domain). The entire domain is 34 characters including the http://. The rest of the info from the plugin appears to be there with a big encoded string after the mtracking.gif file name. I have tried adding another character and an additional “/” to the end of the base mautic url to no avail. Any help is much appreciated.

I have installed the wordpress plugin on v 1.0 from wordpress repository to my wp site running wp v.4.3.1 . I configure the plugin to target my main mautic installation but when I view the page source of a page it shows the full tracking url with the very last character cut off (in my case a “t” from a “.net” domain). The entire domain is 34 characters including the http://. The rest of the info from the plugin appears to be there with a big encoded string after the mtracking.gif file name. I have tried adding another character and an additional “/” to the end of the base mautic url to no avail. Any help is much appreciated.

Interestingly enough - if I use the mautic.com url it works and does not cut off the last character

My developer found the issue with the plugin. It has a .trim function that was cutting off the end of my url: $image = ‘mautic is open source marketing automation’;
removing the .trim function fixed it and it works fine now. I’m not sure why it does that because it should just trim spaces, etc but it was removing the final character in my url as well.

The trim function is there for removing spaces and “/” because if your base URL would end with “/” then the URL to the tracking pixel would look like

http://somemautic.com//mtracking.gif

I’m not sure why it is stripping “t” as well. “t” should strip tabs, “nr” should strip new lines. At least that’s what I thought.
Would your developer be so kind to submit a pull request fixing this issue?

[edit] Found your PR @escopecz [/edit]
This problem is still happening. I’ll fix it and send a pull request.

I wrote an easy fix in another thread about this same problem. This might come in handy for other users:

I know this is a really old post, but perhaps you or other user could still use a sollution.
For me this worked:
(Joomla setup with Mautic plugin)
Find file mautic.php in /plugins/system/mautic
Make a copy, just to be sure
Edit original en find code on line 102:
$mauticUrl = trim($this->params->get(‘base_url’), ‘tnrx0B/’);
Change to:
$mauticUrl = trim($this->params->get(‘base_url’), ’ nrx0B/’);

(so remove the t)

Hope this helps out!

ps: I am no expert at coding whatsover. I just tried this and it works.