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 :: Polls :: Message Navigator
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 22:52 Go to next message
DaveQB is currently offline  DaveQB   Australia
Messages: 109
Registered: January 2006
Location: Sydney
Karma: 0
Senior Member

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 16:49 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 20: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

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 18:03 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
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 21:05 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
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 15:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 16:43 Go to previous messageGo to next message
allenrowand is currently offline  allenrowand   
Messages: 5
Registered: August 2011
Karma: 0
Junior Member
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 18:05 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
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 19:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 12:06 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
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 16:29 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 16:35 Go to previous messageGo to next message
LeCoyote is currently offline  LeCoyote   France
Messages: 18
Registered: October 2012
Karma: 0
Junior Member
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 19:40 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 11:10 Go to previous messageGo to next message
csluyuan is currently offline  csluyuan
Messages: 1
Registered: April 2013
Location: usa
Karma: 0
Junior Member
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 11:42 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NNTP Subject Encoding Bug
Next Topic: karma issue
Goto Forum:
  

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

Current Time: Wed Nov 27 17:59:07 GMT 2024

Total time taken to generate the page: 0.03034 seconds