News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Incorrect url in topic notifications

Started by Sir Osis of Liver, November 23, 2020, 08:34:02 PM

Previous topic - Next topic

Sir Osis of Liver

Topic notifications look like this -

A reply has been posted to a topic you are watching by TKO™. View the reply at: http://kotct2017.knightsofthecoointable.com/index.php?topic=5941.new;topicseen#new Unsubscribe to this topic by using this link: http://kotct2017.knightsofthecointable.com/index.php?action=notify;topic=5941.0 More replies may be posted, but you won't receive any more notifications until you

Unsubscribe link is correct and works, topic link url is incorrect and doesnt work.  It has an extra 'o' - knightsofthecoointable.com.  Any idea what causes this?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Did someone hard code part of the link into the message?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

No, they wouldn't know how to do that.  Where does the script get the url?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Looks like it's here -

Subs-Post.php



$replacements = array(
'TOPICSUBJECT' => $topicData[$row['id_topic']]['subject'],
'POSTERNAME' => un_htmlspecialchars($topicData[$row['id_topic']]['name']),
'TOPICLINK' => $scripturl . '?topic=' . $row['id_topic'] . '.new;topicseen#new',
'UNSUBSCRIBELINK' => $scripturl . '?action=notify;topic=' . $row['id_topic'] . '.0',
);



$scripturl is incorrect in TOPICLINK, but correct in UNSUBSCRIBELINK.  Nothing wrong with email template -

EmailTemplates.english.php



'notification_reply' => array(
/*
@additional_params: notification_reply
TOPICSUBJECT:
POSTERNAME:
TOPICLINK:
UNSUBSCRIBELINK:
@description:
*/
'subject' => 'Topic reply: {TOPICSUBJECT}',
'body' => 'A reply has been posted to a topic you are watching by {POSTERNAME}.

View the reply at: {TOPICLINK}

Unsubscribe to this topic by using this link: {UNSUBSCRIBELINK}

{REGARDS}',
),



It's happened twice. >:(

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

don't think so.... because I can not reproduce this on any of the three systems I tried on.

The issue is almost certainly some local modification
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

I'll ask if they've done anything, but doubt it.  Last package backup Feb 2020, don't see anything iffy in installed packages.  It's a GoDaddy account, but even GD couldn't cause this.  $replacements array is correct, email template is correct, something's borking $scripturl in TOPICLINK but not UNSUBSCRIBELINK in next line, doesn't make sense.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

#7
Did some test posts last night, all notifications were correct.  Apparently this only happens in notifications from the one member (admin) I'm corresponding with.  In addition to incorrect TOPICLINK, linebreaks are stripped.  Doesn't seem possible, but there it is.

A reply has been posted to a topic you are watching by Krashtest.

View the reply at: http://kotct2017.knightsofthecointable.com/index.php?topic=5941.new;topicseen#new

Unsubscribe to this topic by using this link: http://kotct2017.knightsofthecointable.com/index.php?action=notify;topic=5941.0

More replies may be posted, but you won't receive any more notifications until you read the topic.

Regards,
The KOTCT Team.



A reply has been posted to a topic you are watching by TKO™. View the reply at: http://kotct2017.knightsofthecoointable.com/index.php?topic=5941.new;topicseen#new Unsubscribe to this topic by using this link: http://kotct2017.knightsofthecointable.com/index.php?action=notify;topic=5941.0 More replies may be posted, but you won't receive any more notifications until you read the topic. Regards, The KOTCT Team.

Hmm, wonder if the is causing it.  Will play with that tonight.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: