= Description =
The locations generated by the action sitemap.py contain the '''scriptname''' twice and point therefore to nonexistent locations if the scriptname is not empty.
== Steps to reproduce ==
1. Create a wiki which is not located at the / of your webserver.
* {{{http://example.tld/mywiki/}}} - will show the bug
* {{{http://example.tld/}}} - won't show the bug (because scriptname is empty, see below)
2. Fetch a sitemap from the wiki (located at http://example.tld/mywiki/)
{{{wget 'http://example.tld/mywiki/FrontPage?action=sitemap' -O sitemap.xml}}}
3. the entries will look this:
{{{
http://example.tld/mywiki/mywiki/FrontPage
2007-06-16T14:58:29+00:00
daily
1.0
}}}
Note, the '''mywiki/mywiki''' in {{{http://example.tld/mywiki/mywiki/FrontPage}}}.
== Example ==
/!\ This is not my page, so be gentle.
{{{http://wiki.xensource.com/xenwiki/FrontPage ? action=sitemap}}} (unknown MoinMoin version)<
>
{{{http://en.wiki.mesemb.ru/wiki/FrontPage ? action=sitemap}}} (MoinMoin 1.7.2; now works as IvanBoldyrev applied a patch)
== Component selection ==
* !MoinMoin/action/sitemap.py
== Details ==
|| '''!MoinMoin Version''' || Version 1.5.8 [Revision release] ||
See
The {{{}}} field gets written by the following code (line-numbers according to [[http://hg.moinmo.in/moin/1.5/file/e0bd0f4ba9af/MoinMoin/action/sitemap.py|this version]]):
{{{
19 def make_url_xml(vars):
20 """ assemble a single xml fragment """
21 return """\
22
23 %(base)s%(url)s
24 %(lastmod)s
25 %(changefreq)s
26 %(priority)s
27
28 """ % vars
}}}
where
{{{
30 def sitemap_url(request, base, page):
32 url = page.url(request)
}}}
and
{{{
62 def execute(pagename, request):
66 base = request.getBaseURL()
}}}
Both page.url() and request.getBaseURL return the scriptname (as documented in their docstrings), which explains
the double scriptname "mywiki/mywiki".
== Workaround ==
See changeset with fix below.
= Discussion =
I changed status from Fixed to not-fixed because this bug is reproducible in MM 1.7.2 and I see no traces of patch mentioned below in released sources. -- IvanBoldyrev <>
Yes, you are right. It was fixed in 1.5 and obviously I forgot to forward-port that fix to 1.6 (and newer versions). As 1.6 is rather closed meanwhile I directly ported the patch to 1.7 now. -- ThomasWaldmann <>
I've applied the patch to my installation, sitemap has correct URLs. Thanks! -- IvanBoldyrev <>
= Plan =
## This part is for Moin``Moin developers:
* Priority:
* Assigned to: ThomasWaldmann
* Status:
* fixed in 1.5: http://hg.moinmo.in/moin/1.5/rev/82684ab6afcd (please help testing it and report back if it worked)
* not fixed in 1.6 (if you like, you can apply the 1.7 patch)
* fixed in 1.7: http://hg.moinmo.in/moin/1.7/rev/25902b15fcce (please help testing it and report back if it worked)
----
## If you are a moin core developer, replace the category to Category* in these cases:
## Category MoinMoinNoBug - if this is not a bug.
## Category MoinMoinBugConfirmed - if you can confirm the bug on current code.
## Category MoinMoinBugFixed - after the bug is fixed in current code.
CategoryMoinMoinBugFixed