List-archive link not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
New
|
Medium
|
Unassigned |
Bug Description
Running mailman version 2.1.6rc1, new installation on
Scientific Linux 3.04 with Apache and Postfix as
distributed.
The list-archive link supplied in messages loses the
archive name when clicking through to the view by
"thread" link.
Example:
1. Message contains:
List-Archive:
<http://
2. Clicking on this yields a page at the given URI.
NOTE browser is running and already logged into view
the private archive (see step 6 below)
3. Clicking on view by thread link displays new page at
this URI:
http://
containing the text:
No such list 2005q2
Note that the mailing list name (ontogenesis) has been
dropped.
4. If I browse directly to the same URI, same result
(no surprise).
5. If I browse directly to this URI
http://
(note trailing '/') then it works just fine.
6. And here's an extra wrinkle. If the browser is not
already logged in to view the private mailing list,
then the login page is displayed. After logging in,
the requested archive frontpage is displayes *with a
trailing '/' in its URI*, and the view-by link works
just fine.
...
Hypothesis: relative URI calculation is dropping the
final path segment of the base URI when there is no
trailing '/'. (This would be correct behaviour
according to URI spec)
Examination of "view page source" shows that the links
are relative refererecnes within the TOC page, so this
hypothesis appears to be confirmed. Thus, it is vital
that the index page is accessed using a URI with a
trailing '/', otherwise the list name is dropped when a
full URI is formed from the relative reference.
One solution is to place a <BASE> directive in the
<head> of the TOC document. I've edited the
corresponding Index.html by hand, and this seems to work.
I've also identified two simple patches that I think
achieve this:
(1) In Archive/
[[
def html_TOC(self):
mlist = self.maillist
listname = mlist.internal_
mbox =
os.path.
d = {"listname": mlist.real_name,
absolute=1),
absolute=1)+'/', [[[GK]]]
(listname, listname),
mlist.preferred
}
:
]]
(added "archurl" entry)
(2) In templates/
[[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>The %(listname)s Archives</title>
<META NAME="robots" CONTENT=
<BASE href="%(archurl)S">
%(meta)s
</HEAD>
:
]]
(added <BASE ...> in <HEAD>
Similar edits would be needed for other languages.
I haven't figured out how to force mailman to
regenerate the archive TOC file, so haven't yet been
able to test thisyet.
...
Not sure if this might be related to:
[ 767596 ] mailman list archive links not working with
virtual hosts
[http://