Some links in emails not including the full URL


(Moshe Katz) #1

In the email I received this week titled “[Discourse Meta] Forum Activity for 11-30-2013”, all links to topics that are presented in the email with topic text (the top 5 topics in the email) do not have a domain. Instead, they start with “t/”.

For example:

The title text there links to /t/can-google-maps-be-embedded-into-topics/11146 without http://meta.discourse.org on the front.

This only occurs on the top 5 linked posts in the email. The link that is on the Discourse logo at the top of the email, as well as the links on the 35 or so topics linked under the “Other New Topics” heading are all correct.

Additionally, when I view the email source, it is only the HTML part that has this issue. All of the links in the Markdown version of the message (i.e. the text/plain version) are all correct.

I went back through my email, looking at previous Discourse messages ("[Discourse Meta] Forum Activity for 11-22-2013", and back through the summer), and I found that all of them have all of the links (at least, all of the links that I checked) correct.


Full URL for image in text/plain emails
(Moshe Katz) #2

I’m guessing that this is due to a missing #{Discourse.base_url} in discourse/digest.html.erb at master · discourse/discourse · GitHub.

Compare line 16 (featured topics):

<%= link_to t.title, t.relative_url %>

to line 35 (other new topics):

<%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %>

(Sam Saffron) #3

Sounds right, care to try a pull request ?


(Moshe Katz) #4

I sent a pull request.

Note that @eviltrout already did the same fix on a different line in

https://github.com/discourse/discourse/commit/7a60eacca95f7e036bb83ea512cec7225dc73c2c

but it looks like he missed this line.


(Sam Saffron) #5

Cheers! merged it in :slight_smile:


(Sam Saffron) #6

This topic was automatically closed after 1 day. New replies are no longer allowed.