Tags:
create new tag
view all tags

Question

Using MailNotificationEnhanced, I find that WebNotify emails contain an incorrect URL. Contrary to the situation described in WebNotifyEmailURLsAreIncorrect, I actually believe that my TWiki.cfg is OK.

The WebNotify emails work great when checked via MS Outlook - the URL is accurate and all links function correctly. Yet I've recently discovered that when the very same email message is checked via yahoo's website with a web browser, the URLs are incorrect.

Only after asking some of my users did I find that many have been suffering all along - they just thought the WebNotify emails had always been broken ... frown

So this effort is for them, to try and figure out why WebNotify / MailNotificationEnhanced works sometimes, but not others.

Detailed Description

DONE When the message is viewed from MS Outlook:

               <a href="../../view/Common/JapaneseCulture"><b>JapaneseCulture</b></a>

ALERT! When the same email message is viewed in a web browser (mail.yahoo.com)

URL Generated in the E-Mail =
  • Notice how view appears twice in the URL
               <a target="_blank" href="../../view/view/Common/JapaneseCulture"><b>JapaneseCulture</b></a>

Pontifications

Unfortunately, as proficient as I have become with TWiki, I'm a complete dummy with Perl. I don't know where to begin with TWikiDebugging. But I do have a few thoughts, since I've been working on this & trying to figure it out.

  • QUESTION? Why is the HTML source code different in the two scenarios (for the same email message) ? Seems to me that since it's literally the same email message, a view source on it should be identical when view through a web brower and when viewed through Outlook.
    • MOVED TO... I do notice, however, that in the scenario which behaves correctly (outlook), the HTML source code contains the following 1st line. The other source code does not.
                <BASE HREF="../view/Common/WebHome">

  • QUESTION? More importantly, why does the URL in both scenarios contain this ../../view business ? Seems like using a fully qualified domain name to form the complete URL would be more appropriate.
    • MOVED TO... Tell me where to go to fix this and I think the problem is solved !

Thanks a bunch for your help !! I know this is a funny one. But many of my users are doing without an operational WebNotify email.

To provide as much information as possible, I've attached output from testenv, as well as view source outputs from both the one that works (outlook) and the one that does not (browser)

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, CalendarPlugin, EmptyPlugin, InterwikiPlugin, RedirectPlugin, SessionPlugin, SmiliesPlugin, SpacedWikiWordPlugin, TouchGraphPlugin
Server OS: SuSE Linux 8.0, kernel 2.4.21-226
Web server: Apache/1.3.26 (UnitedLinux)
Perl version: v5.8.0 built for i586-linux-thread-multi
Client OS: MS Windows 2000 professional SP4
Web Browser: IE 6

-- KeithHelfrich - 15 Jul 2004

Answer

This is due to a part of code, issue from originate mailnotify.pm (so this bug exist in all mailnotify versions). Fix it in Mailnotify.pm :

Old :

       # change absolute addresses to relative ones & do some cleanup
       $text =~ s/(href=\")$scriptUrlPath/$1..\/../goi;
       $text =~ s/(action=\")$scriptUrlPath/$1..\/../goi;

New:

       # fix some absolute addresses
       $text =~ s/(href=\")$scriptUrlPath/$1$scriptUrl/goi;
       $text =~ s/(action=\")$scriptUrlPath/$1$scriptUrl/goi;

-- PatrickNomblot - 06 Aug 2004

IDEA! THANKS Patrick, that fixed it !!! Take care, -- KeithHelfrich - 07 Aug 2004

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-02-18 - KeithHelfrich
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.