Clicktracking not converting links

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

Clicktracking not converting links

Postby vne101 » 8:00pm, Thu 23 May, 2013

Hi there,

I am running PHPList 2.10.19 and have enabled the click tracking feature. The template that I have created has about 50 links within it, however when this message is sent out all those raw links to the actual URL are left intact, and it is only the 'unsubscribe' link that is changed to the clicktracking URL, eg: /lt.php?id=XD87987987987 etc..

I've checked the DB tables and all of the phplist_linktracking references have been created, yet when the email is sent out none of the template links are converted into click tracking links.

Does anyone know why this might be or have a possible solution?

Many thanks!
vne101
phpList newbie
 
Posts: 4
Joined: 7:56pm, Thu 23 May, 2013

Re: Clicktracking not converting links

Postby vne101 » 8:40am, Fri 24 May, 2013

For anyone reading this I found the problem... basically the template had been created within a Tinymce editor and it had kindly added links in the following format:

Code: Select all
<a mce_href="link.php" href="link.php" >Link</a>


It was the mce_href attribute that was messing everything up. To remove these tags (as they already had the standard href="" attributes, I added this line:

Code: Select all
$htmlmessage = preg_replace('/(<[^>]+) mce_href=".*?"/i', '$1', $htmlmessage);


to /admin/sendemaillib.php above the line:

Code: Select all
preg_match_all('/<a(.*)href=["\'](.*)["\']([^>]*)>(.*)<\/a>/Umis',$htmlmessage,$links);


Hope that helps someone!
vne101
phpList newbie
 
Posts: 4
Joined: 7:56pm, Thu 23 May, 2013


Return to Question & Problems - after installing

Who is online

Users browsing this forum: Google [Bot] and 4 guests