Question
I've recently installed a TWiki for the first time. I enabled email notification of changes, and found that the HTML that I received has two problems with the formatting. All of the links in the second half of the email are broken, and there are unbalanced bold tags.
An example of a couple of entries taken from the email look like this:
<b><a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../view/Tech/ThingsToDo">
ThingsToDo
</a></b>
<a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../rdiff/Tech/ThingsToDo">
<b>19 Dec 2001 - 00:56
</a>
- NEW
</b>
<a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../view/Main/BillDargel">
BillDargel
</a>
<br>
<font size=2>
Working list of Technical Thing To Do Resolve funny rendering of email notifications of vkWiki changes. Set up backup for the visualkey.com server Main.BillDargel ...
</font>
<br>
<b><a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../view/Tech/WebHome">
WebHome
</a></b>
<a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../rdiff/Tech/WebHome">
<b>19 Dec 2001 - 00:52
</a>
- r1.3
<a href="https://secure.visualkey.com/bin/view/Tech/WebHome../../view/Main/BillDargel">
BillDargel
</a>
<br>
<font size=2>
Welcome to the home of vkWiki.Tech. This is a web-based collaboration area for working on Visual Key Technical matters. ThingsToDo MeetingMinutes Maintenance of the ...
</font>
<br>
The above should be exactly what I received, with the addition of some extra whitespace to make the tags more readable.
The relative paths in the links are wrong. In particular the "WebHome.." is not right. It would be right without "WebHome", giving /bin/view/Tech/../../view/Tech/ThingsToDo, or /bin/view/Tech/ThingsToDo, for example.
The Date/Times have an opening bold tag but no closing one. (I would think that it doesn't need bold at all). And a revision that's "New" has a closing bold tag, without an opening one. The net result is that most of the text is bold, including the summary (unless it happened to be New).
The WebChanges that I get in my browser are just fine. I only have this problem in the notification emails.
Is there something messed up with my installation? Or is this a bug?
- TWiki version: 01 Dec 2001
- Web server: Apache 1.3.12
- Server OS: Cobalt 2.2.16
- Email Client: Eudora 4.3.2
- Client OS: Windows NT
--
BillDargel - 18 Dec 2001
Answer
The notify e-mail uses the default
changes.tmpl template, or a skin if activated in the TWikiPreferences. You seem to have a different changes template or a skin activated, an entry in a notification e-mail of the 01 Dec 2001 looks like this:
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<a href="../../view/Codev/CancellingANewPage"><b>CancellingANewPage</b></a>
<b><font color="red"></font><b>
</td><td width="30%">
<a href="../../rdiff/Codev/CancellingANewPage">20 Dec 2001 - 09:34</a> - <b>NEW</b>
</td><td width="20%">
<a href="../../view/Main/DavidLeBlanc">DavidLeBlanc</a>
</td>
</tr>
<tr>
<td colspan="2" width="80%">
<font size="-1">
Bug: (Cancelling A New Page) When you cancel a new page, you get... </font>
</td><td width="20%">
</td>
</tr></table>
So all OK. Check your view.tmpl file or skin if activated.
In regards to the relative URLs, make sure you have
$scriptUrlPath and
$defaultUrlHost set correctly in
TWiki.cfg.
--
PeterThoeny - 21 Dec 2001
Thanks for the response Peter! It inspired me to investigate further and in the process learned more about the operation of TWiki.
The settings in
twiki.cfg for $defaultUrlHost and $scriptUrlPath both looked fine.
No skins had been set in TWikiPreferences nor any changes made to the default
changes.tmpl template.
It turns out to be a Eudora problem.
The problem seems to be in Eudora 5.0 as well as 4.3.
The HTML shown above in the question was what Eudora put back out when the message was written to a file in HTML using "Save As.
When I looked at the underlying file where messages are stored using Notepad, I found the HTML looks just fine, matching what comes out of the standard mailnotify and changes templates.
Apparently Eudora doesn't render tables at all, manages to scramble the bold tags in the process, and doesn't properly handle base + relative URL combining.
The link problem stems from having the base header element include the topic (or document/file).
Eudora apparently just does too simple a concatination of the relative URLs in the body.
As a workaround, I changed:
<base href="%SCRIPTURL %/view %SCRIPTSUFFIX %/%WEB %/%TOPIC %"
to be:
<base href="%SCRIPTURL %/view %SCRIPTSUFFIX %/%WEB %/"
in the
changes.tmpl template. (Ignore the extra spaces -- I didn't know how else to keep the variables from being substituted here in the <verbatim>).
With the workaround, the links in the email notification work just fine in Eudora.
And it doesn't appear to cause any problems with the normal viewing of changes in the web browser.
Still don't know what to do about the screwy bolding though, other than to change email clients.
--
BillDargel - 21 Dec 2001
FWIW, I'm finding the same broken links problem in the notify
emails that I receive from
this web. The links in the first
section work fine, but the same links in the second part, the
ones with dots in them, take me to a TWiki page that says
TWiki . view/Support
. DifferentTWikiUsersOnSeparateWebs (oops, web doesn't exist)
Attention
The "view/Support" web does not exist
[...]
The link in the email was:
http://TWiki.org/cgi-bin/view/Support/WebHome/../../view/Support/AvoidMultipleUploads
If I erase the second "/view" I get this successful URL:
http://TWiki.org/cgi-bin/view/Support/WebHome/../../Support/AvoidMultipleUploads
This email is coming to me via Yahoo mail, but I can't quite see how that could cause the link in the email to be wrong.
(PS: Argh! I used two different topic names in the examples, but I think you get my drift.)
--
SueBlake - 31 Oct 2002