Web Site Comments - Emails and Links

OK. I've got the link in the email working properly. It now links to the proper page - complete with query string.

The only thing that doesn't work is the unsubscribe link in the email. The URL appears to form correctly but it uses & as argument separators instead of &. This causes the link to fail.

If I copy the link and replace & with & the unsubscribe link works.

:0/

Perch

Hi, Claire -

No. Nothing at all.

:0(

Perch

By claire - January 8, 2015

Hm - okay, try adding a htmlspecialchars_decode() to the link when you add it to the email. That should turn the &amp back into &.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi, Claire -

OK, thanks. I'll give it a go. Any idea why this is happening?

:0/

Perch

By claire - January 8, 2015

Not offhand, no. I'd have to see the site to figure it out, and it might not be worth the effort if this is the only real issue.

Encoding problems are usually difficult to nail down, unfortunately.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi, Claire -

Sorry to be a pain, but just for clarrification...

The dodgy placeholder is: #unsubscribeUrl# which is from the "SUBSCRIBER-COMMENT-ADDED" email template.

The code appears (once) in websiteComments.php in this block:

$placeholders = array(
'user.email' => @$CURRENT_USER['email'],
'user.fullname' => @$CURRENT_USER['fullname'],
'user.username' => @$CURRENT_USER['username'],
'commentPageName' => $record['pageName'],
'commentPageUrl' => $record['pageUrl'],
'commentAdminUrl' => $GLOBALS['SETTINGS']['adminUrl'] . "?menu=_wsc_comments&action=edit&num=" . $commentNum,
'commentText' => @$_REQUEST['wsc_comment'],
'unsubscribeUrl' => array_value( explode('?', $record['pageUrl']), 0)

Where do I wrap the code snippet you gave me?

:0/

Perch

By claire - January 9, 2015

There might be something else going on here. Could you send in a support request email? I'll pick it up and take a look at the files directly.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/