Description
Internal links in exported html are incorrectly generated as absolute paths.
Export Dumps worked fine with 1.8 but no longer with 1.9.1 and 1.9.3.
Steps to reproduce
Call "moin.py --config-dir=<..> export dump --t=<..> --wiki-url=http://<..>"
Check internal links. They look like href="/<page.html>" instead of href="page.html"
Component selection
- general
Details
MoinMoin Version |
1.9.x |
OS and Version |
Windows Vista |
Python Version |
2.6 |
Server Setup |
No Server (quick installation), Wikifarm Configuration |
Server Details |
- |
Language you are using the wiki in (set in the browser/UserPreferences) |
Deutsch |
Workaround
In my case the links look like href=/wiki/page.html. But the following patch seems to work here:
1 diff -u MoinMoin/script/export/dump.py.~1~ MoinMoin/script/export/dump.py 2 --- MoinMoin/script/export/dump.py.~1~ 3 +++ MoinMoin/script/export/dump.py 4 @@ -151,8 +151,8 @@ 5 self.init_request() 6 request = self.request 7 8 - # fix url_prefix_static so we get relative paths in output html 9 - request.cfg.url_prefix_static = url_prefix_static 10 + # fix script_root so we get relative paths in output html 11 + request.script_root = url_prefix_static 12 13 # use this user for permissions checks 14 request.user = user.User(request, name=self.options.dump_user) 15 16 Diff finished. Thu Jul 08 09:07:50 2010
-- EmilioLopes 2010-07-07 15:35:51
This patch also works for me. I had the problem that moin 1.9.3 always added the wiki name as prefix to the generated html pages (<a href="/wikiname/....) -- RalfGroß 2011-03-16 14:42:34
Discussion
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.9/rev/34fb41293eab - thanks for the patch!