FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Email notification missing domain in links ($goto_url['email'] = '{FULL_ROOT}{ROOT}?t=rview&goto='.$msg_id.'#msg_'.$msg_id;)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Email notification missing domain in links [message #162523] Tue, 01 June 2010 18:52 Go to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user

So emails only have the relative path and is missing the domain. Thus links don't work. They did for a short period (few days) when I upgraded to 2.8.1 (I think that is the version I am on)

In file src/imsg_edt.inc.t line 732, I have:

$goto_url['email'] = '{FULL_ROOT}{ROOT}?t=rview&goto='.$msg_id.'#msg_'.$msg_id;

So looks right.

What am I missing?


Thanks for reading!!
Re: Email notification missing domain in links [message #162525 is a reply to message #162523] Wed, 02 June 2010 12:49 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Really? Notification mails from this forum contain the full URL (including domain). Has anyone else seen this?
Re: Email notification missing domain in links [message #162529 is a reply to message #162525] Wed, 02 June 2010 16:52 Go to previous messageGo to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user

Yeah I understand that is the purpose and intent, but for some reason my install is missing this such feature. Thus links are not clickable.

The template looks right to me, but I am no way an expert and it could be wrong.
Re: Email notification missing domain in links [message #166854 is a reply to message #162529] Wed, 07 March 2012 13:03 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hate to create a zombie thread, but I have the same issue. My subscription emails have the links in the footer, but are missing the domain so they start "index.php?t" rather than "http://mydomain.com/forum/index.php?t"...

I can't find the FULL_ROOT variable (I'm not very knowledgable, but I poked in Globals.php and found WWW_ROOT. I tried duplicating WWW_ROOT, named the duplicate FULL_ROOT and rebuilt the template but no luck. Any help would be greatly appreciated.

I'm running FUDforum 3.0.2 on PHP 5.2.9.

Thanks,
Allen
Re: Email notification missing domain in links [message #167879 is a reply to message #166854] Tue, 30 October 2012 17:05 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I finally had time to chase this down, and know (at least for me) why this is happening: my email notifications are missing the <base> tag, which is why none of the links resolve. They are missing when I use my custom theme, but if I switch to the default theme the base tag is present in the emails. Could someone tell me which file I need to edit to insert the <base> in the header of email notifications? I'm currently running FUDforum 3.0.4.

Thanks,
Allen
Re: Email notification missing domain in links [message #167886 is a reply to message #167879] Wed, 31 October 2012 11:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
I don't have time to trace all the code, but it's probably the 'header_plain' in header.tmpl.
Re: Email notification missing domain in links [message #167888 is a reply to message #167886] Wed, 31 October 2012 12:43 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Thank you!

Inserting <base href="{FULL_ROOT}" /> in header.tmpl and rebuilding the theme has fixed the issue.
Re: Email notification missing domain in links [message #168090 is a reply to message #167888] Fri, 25 January 2013 13:05 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi,

It seems that even with a full URL in the base tag, some clients (Thunderbird among them) sometimes disregard it entirely. I've had people forward me the source of the email just to make sure.
It would be better to change the links so that they use WWW_ROOT instead of relying on base, at least it's a sure-fire way to solve the problem Smile
Cheers
--
Romain
Re: Email notification missing domain in links [message #168095 is a reply to message #168090] Fri, 25 January 2013 14:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Valid point. Can you prepare a patch for us?
Re: Email notification missing domain in links [message #168104 is a reply to message #168095] Sun, 27 January 2013 07:06 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi,

The problem can be addressed quickly by changing {ROOT} to {FULL_ROOT}{ROOT} in the following templates:
- iemail_body_lnk
- iemail_body_lnk1
- iemail_thread_unsub_lnk
- iemail_forum_unsub_lnk

Here's a diff for forum_data/thm/default/tmpl/iemail.tmpl:
109c109
< {ROOT}?t=rview&th={VAR: id}
---
> {FULL_ROOT}{ROOT}?t=rview&th={VAR: id}
113c113
< {ROOT}?t=rview&frm_id={VAR: id}
---
> {FULL_ROOT}{ROOT}?t=rview&frm_id={VAR: id}
117c117
< {ROOT}?t=post&reply_to={VAR: obj->id}
---
> {FULL_ROOT}{ROOT}?t=post&reply_to={VAR: obj->id}
121c121
< {ROOT}?t=rview&goto={VAR: obj->id}#msg_{VAR: obj->id}
---
> {FULL_ROOT}{ROOT}?t=rview&goto={VAR: obj->id}#msg_{VAR: obj->id}


Cheers
--
Romain
Re: Email notification missing domain in links [message #168105 is a reply to message #168104] Sun, 27 January 2013 11:29 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Excellent work! We probably also need to change the corresponding template in the PATH_INFO theme.

Can I commit it, or do you want access to commit it yourself?
Re: Email notification missing domain in links [message #168106 is a reply to message #168105] Sun, 27 January 2013 11:35 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Ah, could be, I didn't check. The base tage can probably be omitted too, although it shouldn't make much of a difference.

As for the commit, as you wish, really... unless it involves using SVN, in which case I will politely decline Wink
Re: Email notification missing domain in links [message #168107 is a reply to message #168106] Sun, 27 January 2013 14:40 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
It's still on SVN. Patch committed @ http://fudforum.svn.sourceforge.net/fudforum/?rev=5586&view=rev
Aw: Re: Email notification missing domain in links [message #168402 is a reply to message #168107] Fri, 26 April 2013 07:10 Go to previous messageGo to next message
csluyuan is currently offline  csluyuan
Messages: 1
Registered: April 2013
Location: usa
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I can't find the FULL_ROOT variable (I'm not very knowledgable, but I poked in Globals.php and found WWW_ROOT. I tried duplicating WWW_ROOT, named the duplicate FULL_ROOT and rebuilt the template but no luck. Any help would be greatly appreciated.
Re: Aw: Re: Email notification missing domain in links [message #168403 is a reply to message #168402] Fri, 26 April 2013 07:42 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
The {FULL_ROOT} you see in templates is in fact WWW_ROOT in GLOBALS.php.
{ROOT} is 'index.php'.

These substitutions are done by 'compiler.inc' in the include/ directory. Thus, you won't see your changes until you recompile your theme.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: NNTP Subject Encoding Bug
Next Topic: karma issue
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Dec 15 18:26:59 EST 2017

Total time taken to generate the page: 0.00910 seconds